XMLParser

Low-level class for creating parsers for url=https://en.wikipedia.org/wiki/XMLXML/url 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()

Gets the amount of attributes in the current element.

getAttributeName
String getAttributeName(long idx)

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

getAttributeValue
String getAttributeValue(long idx)

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

getCurrentLine
long getCurrentLine()

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

getNamedAttributeValue
String getNamedAttributeValue(String name)

Gets 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(String name)

Gets 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()

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

getNodeName
String getNodeName()

Gets the name of the current element node. This will raise an error if the current node type is neither constant NODE_ELEMENT nor constant NODE_ELEMENT_END.

getNodeOffset
long getNodeOffset()

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

getNodeType
XMLParser.NodeType getNodeType()

Gets the type of the current node. Compare with nodetype constants.

hasAttribute
bool hasAttribute(String name)

Check whether 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
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(XMLParser other)
opEquals
bool opEquals(typeof(null) n)
open
GodotError open(String file)

Opens an XML file for parsing. This returns an error code.

openBuffer
GodotError openBuffer(PoolByteArray buffer)

Opens an XML raw buffer for parsing. This returns an error code.

read
GodotError read()

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

seek
GodotError seek(long position)

Moves 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.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
XMLParser _new()

Construct a new instance of XMLParser. Note: use memnew!XMLParser instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
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
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(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