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.
Get the amount of attributes in the current element.
Get the name of the attribute specified by the index in [code]idx[/code] argument.
Get the value of the attribute specified by the index in [code]idx[/code] argument.
Get the current line in the parsed file (currently not implemented).
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.
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.
Get the contents of a text node. This will raise an error in any other type of node.
Get the name of the current element node. This will raise an error if the current node type is not [constant NODE_ELEMENT] nor [constant NODE_ELEMENT_END]
Get the byte offset of the current node since the beginning of the file or buffer.
Get the type of the current node. Compare with [code]NODE_*[/code] constants.
Check whether or not the current element has a certain attribute.
Check whether the current element is empty (this only works for completely empty tags, e.g. <element \>).
Open a XML file for parsing. This returns an error code.
Open a XML raw buffer for parsing. This returns an error code.
Read the next node of the file. This returns an error code.
Move the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code.
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.
There's no node (no file or buffer opened)
Element (tag)
End of element
Text node
Comment node
CDATA content
Unknown node