soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
IXmlDoc Interface Reference

Interface for XML Document. More...

#include <sxml-i.h>

Inheritance diagram for IXmlDoc:
IObjRef TObjRefImpl< IXmlDoc > SXmlDoc

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).
 
IXmlNodeRoot () SCONST PURE
 Gets the document element (root node).
 
- Public Member Functions inherited from IObjRef
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.
 

Detailed Description

Interface for XML Document.

Definition at line 471 of file sxml-i.h.

Member Function Documentation

◆ AddRef()

long IXmlDoc::AddRef ( )

Adds a reference to the document.

Returns
The new reference count.

Implemented in TObjRefImpl< IXmlDoc >.

◆ Copy()

void IXmlDoc::Copy ( const IXmlDoc * proto)

Removes all nodes, then copies the entire contents of the specified document.

Parameters
protoPointer to the document to copy.

Implemented in SXmlDoc.

◆ GetParseResult()

void IXmlDoc::GetParseResult ( XmlParseResult * pResult)

Gets the parsing result.

Parameters
pResultPointer to the XmlParseResult structure to store the result.

Implemented in SXmlDoc.

◆ GetPrivPtr()

LPVOID IXmlDoc::GetPrivPtr ( )

Gets the private pointer associated with the document.

Returns
Pointer to private data.

Implemented in SXmlDoc.

◆ LoadBuffer()

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.

Parameters
contentsPointer to the buffer containing the XML data.
sizeSize of the buffer.
optionsParsing options.
encodingDocument encoding.
Returns
TRUE if successful, FALSE otherwise.

Implemented in SXmlDoc.

◆ LoadBufferInplace()

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.

Parameters
contentsPointer to the buffer containing the XML data.
sizeSize of the buffer.
optionsParsing options.
encodingDocument encoding.
Returns
TRUE if successful, FALSE otherwise.

Implemented in SXmlDoc.

◆ LoadBufferInplaceOwn()

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).

Parameters
contentsPointer to the buffer containing the XML data.
sizeSize of the buffer.
optionsParsing options.
encodingDocument encoding.
Returns
TRUE if successful, FALSE otherwise.

Implemented in SXmlDoc.

◆ LoadFileA()

BOOL IXmlDoc::LoadFileA ( const char * path,
unsigned int options,
XmlEncoding encoding )

Loads the document from a file (ANSI version).

Parameters
pathPath to the file.
optionsParsing options.
encodingDocument encoding.
Returns
TRUE if successful, FALSE otherwise.

Implemented in SXmlDoc.

◆ LoadFileW()

BOOL IXmlDoc::LoadFileW ( const wchar_t * path,
unsigned int options,
XmlEncoding encoding )

Loads the document from a file (Unicode version).

Parameters
pathPath to the file.
optionsParsing options.
encodingDocument encoding.
Returns
TRUE if successful, FALSE otherwise.

Implemented in SXmlDoc.

◆ LoadString()

BOOL IXmlDoc::LoadString ( const wchar_t * contents,
unsigned int options )

Loads the document from a zero-terminated string. No encoding conversions are applied.

Parameters
contentsZero-terminated string containing the XML data.
optionsParsing options.
Returns
TRUE if successful, FALSE otherwise.

Implemented in SXmlDoc.

◆ OnFinalRelease()

void IXmlDoc::OnFinalRelease ( )

Releases the document object.

Implemented in TObjRefImpl< IXmlDoc >.

◆ Release()

long IXmlDoc::Release ( )

Releases a reference to the document.

Returns
The new reference count.

Implemented in TObjRefImpl< IXmlDoc >.

◆ Reset()

void IXmlDoc::Reset ( )

Resets the document, removing all nodes.

Implemented in SXmlDoc.

◆ Root()

IXmlNode * IXmlDoc::Root ( )

Gets the document element (root node).

Returns
Pointer to the root node.

Implemented in SXmlDoc.

◆ SaveBinary()

void IXmlDoc::SaveBinary ( FILE * f)

Saves the XML document to a writer (semantics is slightly different from xml_node::print, see documentation for details).

Parameters
fPointer to the file stream.

Implemented in SXmlDoc.

◆ SaveFileA()

BOOL IXmlDoc::SaveFileA ( const char * path,
const wchar_t * indent,
unsigned int flags,
XmlEncoding encoding )

Saves the XML document to a file (ANSI version).

Parameters
pathPath to the file.
indentIndentation string.
flagsSaving flags.
encodingDocument encoding.
Returns
TRUE if successful, FALSE otherwise.

Implemented in SXmlDoc.

◆ SaveFileW()

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).

Parameters
pathPath to the file.
indentIndentation string.
flagsSaving flags.
encodingDocument encoding.
Returns
TRUE if successful, FALSE otherwise.

Implemented in SXmlDoc.


The documentation for this interface was generated from the following file: