wxXmlDocument

wxXmlDocument

Creation Parameters
Functions/Procedures
Supertopics
Subtopics

wxXmlDocument

[func]
detatch_xml_root
( atom xmldoc )

Category: wxXmlDocument

Detaches the document root node and returns it. The document root node will be set to NULL and thus xml_is_ok will return false after calling this function.

Note that the caller is reponsible for deleting the returned node in order to avoid memory leaks.


wxXmlDocument

[func]
get_xml_encoding
( atom xmldoc )

Category: wxXmlDocument

Returns encoding of in-memory representation of the document (same as passed to Load or constructor, defaults to UTF-8).

Note: this is meaningless in Unicode build where data are stored as wchar_t*.


wxXmlDocument

[func]
get_xml_file_encoding
( atom xmldoc )

Category: wxXmlDocument

Returns encoding of document (may be empty).

Note: this is the encoding original file was saved in, not the encoding of in-memory representation!


wxXmlDocument

[func]
get_xml_root
( atom xmldoc )

Category: wxXmlDocument

Returns the root node of the document.


wxXmlDocument

[func]
get_xml_version
( atom xmldoc )

Category: wxXmlDocument

Returns the version of document. This is the value in the <?xml version="1.0"?> header of the XML document. If the version property was not explicitely given in the header, this function returns an empty string.


wxXmlDocument

[func]
load_xml
( atom xmldoc, sequence filename, object options )

Category: wxXmlDocument

Parses filename as an xml document and loads its data.

If options does not contain wxXMLDOC_KEEP_WHITESPACE_NODES, then, while loading, all nodes of type wxXML_TEXT_NODE (see wxXmlNode) are automatically skipped if they contain whitespaces only. The removal of these nodes makes the load process slightly faster and requires less memory however makes impossible to recreate exactly the loaded text with a Save call later. Read the initial description of this class for more info.

Returns true on success, false otherwise.


wxXmlDocument

[func]
save_xml
( atom xmldoc, sequence filename, atom indentstep )

Category: wxXmlDocument

Saves XML tree creating a file named with given string.

If indentstep is greater than or equal to zero, then, while saving, an automatic indentation is added with steps composed by indentstep spaces. If indentstep is wxXML_NO_INDENTATION, then, automatic indentation is turned off.


wxXmlDocument

[proc]
set_xml_encoding
( atom xmldoc, sequence enc )

Category: wxXmlDocument

Sets the enconding of the document.


wxXmlDocument

[proc]
set_xml_file_encoding
( atom xmldoc, sequence enc )

Category: wxXmlDocument

Sets the enconding of the file which will be used to save the document.


wxXmlDocument

[proc]
set_xml_root
( atom xmldoc, atom node )

Category: wxXmlDocument

Sets the root node of this document. Deletes previous root node. Use DetachRoot and then SetRoot if you want to replace the root node without deleting the old document tree.


wxXmlDocument

[proc]
set_xml_version
( atom xmldoc, object version )

Category: wxXmlDocument

Sets the version of the XML file which will be used to save the document.


wxXmlDocument

[func]
xml_is_ok
( atom xmldoc )

Category: wxXmlDocument

Returns true if the document has been loaded successfully.