Class XMLDocument

#include <Geode/cocos/support/tinyxml2/tinyxml2.h>
classXMLDocument:publictinyxml2::XMLNode{ ... }

A Document binds together all the functionality. It can be saved, loaded, and printed to the screen. All Nodes are connected and allocated to a Document. If the Document is deleted, all its Nodes are also deleted.

Examples0
Public static methods0
Public member functions30
virtualtinyxml2::XMLDocument*ToDocument()
No description provided
virtualtinyxml2::XMLDocumentconst*ToDocument()const
No description provided
tinyxml2::XMLErrorParse(,
_::size_tnBytes
)

Parse an XML file from a character string. Returns XML_NO_ERROR (0) on success, or an errorID. You may optionally pass in the ‘nBytes’, which is the number of bytes which will be parsed. If not specified, TinyXML will assume ‘xml’ points to a null terminated string.

tinyxml2::XMLErrorLoadFile(
charconst*filename
)

Load an XML file from disk. Returns XML_NO_ERROR (0) on success, or an errorID.

tinyxml2::XMLErrorLoadFile()

Load an XML file from disk. You are responsible for providing and closing the FILE*. Returns XML_NO_ERROR (0) on success, or an errorID.

tinyxml2::XMLErrorSaveFile(
charconst*filename
,
boolcompact
)

Save the XML file to disk. Returns XML_NO_ERROR (0) on success, or an errorID.

tinyxml2::XMLErrorSaveFile(,
boolcompact
)

Save the XML file to disk. You are responsible for providing and closing the FILE*. Returns XML_NO_ERROR (0) on success, or an errorID.

boolProcessEntities()const
No description provided
tinyxml2::WhitespaceWhitespaceMode()const
No description provided
boolHasBOM()const

Returns true if this document has a leading Byte Order Mark of UTF8.

voidSetBOM(
booluseBOM
)

Sets whether to write the BOM when writing the file.

tinyxml2::XMLElement*RootElement()

Return the root element of DOM. Equivalent to FirstChildElement(). To get the first node, use FirstChild().

tinyxml2::XMLElementconst*RootElement()const
No description provided
voidPrint()

Print the Document. If the Printer is not provided, it will print to stdout. If you provide Printer, this can print to a file:

virtualboolAccept()const
No description provided
tinyxml2::XMLElement*NewElement()

Create a new Element associated with this Document. The memory for the Element is managed by the Document.

tinyxml2::XMLComment*NewComment(
charconst*comment
)

Create a new Comment associated with this Document. The memory for the Comment is managed by the Document.

tinyxml2::XMLText*NewText()

Create a new Text associated with this Document. The memory for the Text is managed by the Document.

tinyxml2::XMLDeclaration*NewDeclaration()

Create a new Declaration associated with this Document. The memory for the object is managed by the Document. If the ‘text’ param is null, the standard declaration is used.:

tinyxml2::XMLUnknown*NewUnknown()

Create a new Unknown associated with this Document. The memory forthe object is managed by the Document.

voidDeleteNode()

Delete a node associated with this document. It will be unlinked from the DOM.

voidSetError(,,)
No description provided
boolError()const

/// Return true if there was an error parsing the document.

tinyxml2::XMLErrorErrorID()const

/// Return the errorID.

charconst*GetErrorStr1()const

/// Return a possibly helpful diagnostic location or string.

charconst*GetErrorStr2()const

/// Return a possibly helpful secondary diagnostic location or string.

voidPrintError()const

/// If there is an error, print it to stdout.

char*Identify(,)
No description provided
virtualtinyxml2::XMLNode*ShallowClone()const
No description provided
virtualboolShallowEqual()const
No description provided
Fields0
Protected member functions0
Protected fields0