Interface for XML Document. More...
#include <sxml-i.h>
Public Member Functions | |
long | AddRef () PURE |
Adds a reference to the document. | |
long | Release () PURE |
Releases a reference to the document. | |
void | OnFinalRelease () PURE |
Releases the document object. | |
LPVOID | GetPrivPtr () SCONST PURE |
Gets the private pointer associated with the document. | |
void | Reset () PURE |
Resets the document, removing all nodes. | |
void | Copy (const IXmlDoc *proto) PURE |
Removes all nodes, then copies the entire contents of the specified document. | |
BOOL | LoadString (const wchar_t *contents, unsigned int options) PURE |
Loads the document from a zero-terminated string. No encoding conversions are applied. | |
BOOL | LoadFileA (const char *path, unsigned int options, XmlEncoding encoding) PURE |
Loads the document from a file (ANSI version). | |
BOOL | LoadFileW (const wchar_t *path, unsigned int options, XmlEncoding encoding) PURE |
Loads the document from a file (Unicode version). | |
BOOL | LoadBuffer (const void *contents, size_t size, unsigned int options, XmlEncoding encoding) PURE |
Loads the document from a buffer. Copies/converts the buffer, so it may be deleted or changed after the function returns. | |
BOOL | LoadBufferInplace (void *contents, size_t size, unsigned int options, XmlEncoding encoding) PURE |
Loads the document from a buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data). You should ensure that buffer data will persist throughout the document's lifetime, and free the buffer memory manually once the document is destroyed. | |
BOOL | LoadBufferInplaceOwn (void *contents, size_t size, unsigned int options, XmlEncoding encoding) PURE |
Loads the document from a buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data). You should allocate the buffer with pugixml allocation function; the document will free the buffer when it is no longer needed (you can't use it anymore). | |
void | GetParseResult (XmlParseResult *pResult) SCONST PURE |
Gets the parsing result. | |
void | SaveBinary (FILE *f) SCONST PURE |
Saves the XML document to a writer (semantics is slightly different from xml_node::print, see documentation for details). | |
BOOL | SaveFileA (const char *path, const wchar_t *indent, unsigned int flags, XmlEncoding encoding) SCONST PURE |
Saves the XML document to a file (ANSI version). | |
BOOL | SaveFileW (const wchar_t *path, const wchar_t *indent, unsigned int flags, XmlEncoding encoding) SCONST PURE |
Saves the XML document to a file (Unicode version). | |
IXmlNode * | Root () SCONST PURE |
Gets the document element (root node). | |
![]() | |
long | AddRef () PURE |
Increases the reference count. | |
long | Release () PURE |
Decreases the reference count. | |
void | OnFinalRelease () PURE |
Called when the reference count reaches zero and the object is about to be released. | |
long IXmlDoc::AddRef | ( | ) |
Adds a reference to the document.
Implemented in TObjRefImpl< IXmlDoc >.
void IXmlDoc::Copy | ( | const IXmlDoc * | proto | ) |
Removes all nodes, then copies the entire contents of the specified document.
proto | Pointer to the document to copy. |
Implemented in SXmlDoc.
void IXmlDoc::GetParseResult | ( | XmlParseResult * | pResult | ) |
Gets the parsing result.
pResult | Pointer to the XmlParseResult structure to store the result. |
Implemented in SXmlDoc.
LPVOID IXmlDoc::GetPrivPtr | ( | ) |
Gets the private pointer associated with the document.
Implemented in SXmlDoc.
BOOL IXmlDoc::LoadBuffer | ( | const void * | contents, |
size_t | size, | ||
unsigned int | options, | ||
XmlEncoding | encoding ) |
Loads the document from a buffer. Copies/converts the buffer, so it may be deleted or changed after the function returns.
contents | Pointer to the buffer containing the XML data. |
size | Size of the buffer. |
options | Parsing options. |
encoding | Document encoding. |
Implemented in SXmlDoc.
BOOL IXmlDoc::LoadBufferInplace | ( | void * | contents, |
size_t | size, | ||
unsigned int | options, | ||
XmlEncoding | encoding ) |
Loads the document from a buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data). You should ensure that buffer data will persist throughout the document's lifetime, and free the buffer memory manually once the document is destroyed.
contents | Pointer to the buffer containing the XML data. |
size | Size of the buffer. |
options | Parsing options. |
encoding | Document encoding. |
Implemented in SXmlDoc.
BOOL IXmlDoc::LoadBufferInplaceOwn | ( | void * | contents, |
size_t | size, | ||
unsigned int | options, | ||
XmlEncoding | encoding ) |
Loads the document from a buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data). You should allocate the buffer with pugixml allocation function; the document will free the buffer when it is no longer needed (you can't use it anymore).
contents | Pointer to the buffer containing the XML data. |
size | Size of the buffer. |
options | Parsing options. |
encoding | Document encoding. |
Implemented in SXmlDoc.
BOOL IXmlDoc::LoadFileA | ( | const char * | path, |
unsigned int | options, | ||
XmlEncoding | encoding ) |
Loads the document from a file (ANSI version).
path | Path to the file. |
options | Parsing options. |
encoding | Document encoding. |
Implemented in SXmlDoc.
BOOL IXmlDoc::LoadFileW | ( | const wchar_t * | path, |
unsigned int | options, | ||
XmlEncoding | encoding ) |
Loads the document from a file (Unicode version).
path | Path to the file. |
options | Parsing options. |
encoding | Document encoding. |
Implemented in SXmlDoc.
BOOL IXmlDoc::LoadString | ( | const wchar_t * | contents, |
unsigned int | options ) |
Loads the document from a zero-terminated string. No encoding conversions are applied.
contents | Zero-terminated string containing the XML data. |
options | Parsing options. |
Implemented in SXmlDoc.
void IXmlDoc::OnFinalRelease | ( | ) |
Releases the document object.
Implemented in TObjRefImpl< IXmlDoc >.
long IXmlDoc::Release | ( | ) |
Releases a reference to the document.
Implemented in TObjRefImpl< IXmlDoc >.
void IXmlDoc::Reset | ( | ) |
Resets the document, removing all nodes.
Implemented in SXmlDoc.
IXmlNode * IXmlDoc::Root | ( | ) |
void IXmlDoc::SaveBinary | ( | FILE * | f | ) |
Saves the XML document to a writer (semantics is slightly different from xml_node::print, see documentation for details).
f | Pointer to the file stream. |
Implemented in SXmlDoc.
BOOL IXmlDoc::SaveFileA | ( | const char * | path, |
const wchar_t * | indent, | ||
unsigned int | flags, | ||
XmlEncoding | encoding ) |
Saves the XML document to a file (ANSI version).
path | Path to the file. |
indent | Indentation string. |
flags | Saving flags. |
encoding | Document encoding. |
Implemented in SXmlDoc.
BOOL IXmlDoc::SaveFileW | ( | const wchar_t * | path, |
const wchar_t * | indent, | ||
unsigned int | flags, | ||
XmlEncoding | encoding ) |
Saves the XML document to a file (Unicode version).
path | Path to the file. |
indent | Indentation string. |
flags | Saving flags. |
encoding | Document encoding. |
Implemented in SXmlDoc.