This class has noncopyable semantics (private copy ctor/assignment operator).
Public Member Functions | |
xml_document () | |
Default ctor, makes empty document. | |
~xml_document () | |
Dtor. | |
xml_parse_result | load (std::istream &stream, unsigned int options=parse_default) |
Load document from stream. | |
xml_parse_result | load (const char *contents, unsigned int options=parse_default) |
Load document from string. | |
xml_parse_result | load_file (const char *name, unsigned int options=parse_default) |
Load document from file. | |
xml_parse_result | parse (char *xmlstr, unsigned int options=parse_default) |
Parse the given XML string in-situ. | |
xml_parse_result | parse (const transfer_ownership_tag &, char *xmlstr, unsigned int options=parse_default) |
Parse the given XML string in-situ (gains ownership). | |
void | save (xml_writer &writer, const char *indent="\t", unsigned int flags=format_default) |
Save XML to writer. | |
bool | save_file (const char *name, const char *indent="\t", unsigned int flags=format_default) |
Save XML to file. | |
void | precompute_document_order () |
Compute document order for the whole tree Sometimes this makes evaluation of XPath queries faster. |
|
Load document from stream.
|
|
Load document from string.
|
|
Load document from file.
|
|
Parse the given XML string in-situ. The string is modified; you should ensure that string data will persist throughout the document's lifetime. Although, document does not gain ownership over the string, so you should free the memory occupied by it manually.
|
|
Parse the given XML string in-situ (gains ownership). The string is modified; document gains ownership over the string, so you don't have to worry about it's lifetime. Call example: doc.parse(transfer_ownership_tag(), string, options);
|
|
Save XML to writer.
|
|
Save XML to file.
|