XMLParser

Low-level class for creating parsers for XML files.

This class can serve as base to make custom XML parsers. Since XML is a very flexible standard, this interface is low level so it can be applied to any possible schema.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants
NodeType
enum NodeType

Functions

getAttributeCount
long getAttributeCount()

Get the amount of attributes in the current element.

getAttributeName
String getAttributeName(long idx)

Get the name of the attribute specified by the index in idx argument.

getAttributeValue
String getAttributeValue(long idx)

Get the value of the attribute specified by the index in idx argument.

getCurrentLine
long getCurrentLine()

Get the current line in the parsed file (currently not implemented).

getNamedAttributeValue
String getNamedAttributeValue(StringArg0 name)

Get the value of a certain attribute of the current element by name. This will raise an error if the element has no such attribute.

getNamedAttributeValueSafe
String getNamedAttributeValueSafe(StringArg0 name)

Get the value of a certain attribute of the current element by name. This will return an empty String if the attribute is not found.

getNodeData
String getNodeData()

Get the contents of a text node. This will raise an error in any other type of node.

getNodeName
String getNodeName()

Get the name of the current element node. This will raise an error if the current node type is not NODE_ELEMENT nor NODE_ELEMENT_END

getNodeOffset
long getNodeOffset()

Get the byte offset of the current node since the beginning of the file or buffer.

getNodeType
XMLParser.NodeType getNodeType()

Get the type of the current node. Compare with NODE_* constants.

hasAttribute
bool hasAttribute(StringArg0 name)

Check whether or not the current element has a certain attribute.

isEmpty
bool isEmpty()

Check whether the current element is empty (this only works for completely empty tags, e.g. <element \>).

opAssign
XMLParser opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(XMLParser other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
open
GodotError open(StringArg0 file)

Open a XML file for parsing. This returns an error code.

openBuffer
GodotError openBuffer(PoolByteArray buffer)

Open a XML raw buffer for parsing. This returns an error code.

read
GodotError read()

Read the next node of the file. This returns an error code.

seek
GodotError seek(long position)

Move the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code.

skipSection
void skipSection()

Skips the current section. If the node contains other elements, they will be ignored and the cursor will go to the closing of the current element.

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
XMLParser _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta