XMLUtils Class Reference
[Formats Module]

#include <xmlutils.h>

List of all members.


Detailed Description

Covers usefull methods that make working with Xerces-C library easier. All methods are static so you don't need to create an instance.

Static Public Member Functions

static bool Init ()
static void Done ()
static XercesDOMParser * CreateParser ()
static DOMWriter * CreateWriter ()
static ErrorHandler * CreateParseErrorHandler ()
static DOMErrorHandler * CreateWriteErrorHandler ()
static
MemBufInputSource * 
CreateMemorySource (const byte_t *buffer, long size, const char *source_id)
static
MemBufFormatTarget * 
CreateMemoryTarget ()
static bool ParseSource (XercesDOMParser *parser, InputSource *source)
static bool WriteTarget (DOMWriter *writer, XMLFormatTarget *target, DOMNode *node)
static DOMDocument * CreateDocument (const char *root_name)
static const XMLCh * GetAttributeValue (const DOMElement *element, const char *attr_name)
static ushort_t GetSubElementsCount (const DOMElement *element)

Member Function Documentation

bool XMLUtils::Init (  )  [inline, static]

Initializes Xerces-C library. Library can be initialized and terminated multiple times.

Returns:
True if successful.

void XMLUtils::Done (  )  [inline, static]

Terminates Xerces-C library. Library can be initialized and terminated multiple times.

XercesDOMParser * XMLUtils::CreateParser (  )  [inline, static]

Creates DOM parser and sets wanted properties.

Returns:
Parser object.

DOMWriter * XMLUtils::CreateWriter (  )  [inline, static]

Creates DOM writer and sets wanted properties.

Returns:
Writer object.

ErrorHandler * XMLUtils::CreateParseErrorHandler (  )  [inline, static]

Creates error handler for parsing.

Returns:
Error handler.

DOMErrorHandler * XMLUtils::CreateWriteErrorHandler (  )  [inline, static]

Creates error handler for writing.

Returns:
Error handler.

MemBufInputSource * XMLUtils::CreateMemorySource ( const byte_t buffer,
long  size,
const char *  source_id 
) [inline, static]

Creates memory source from given memory buffer.

Parameters:
buffer Memory buffer.
size Size of memory buffer.
source_id Text identifier of new memory source.
Returns:
Memory source object.

MemBufFormatTarget * XMLUtils::CreateMemoryTarget (  )  [inline, static]

Creates memory source from given memory buffer.

Returns:
Memory source object.

bool XMLUtils::ParseSource ( XercesDOMParser *  parser,
InputSource *  source 
) [inline, static]

Parses data from source using given parser.

Parameters:
parser DOM parser object.
source Input source object.
Returns:
True if successful.

bool XMLUtils::WriteTarget ( DOMWriter *  writer,
XMLFormatTarget *  target,
DOMNode *  node 
) [inline, static]

Writes data to target using given writer.

Parameters:
writer DOM writer object.
target Input source object.
node Node to write.
Returns:
True if successful.

DOMDocument * XMLUtils::CreateDocument ( const char *  root_name  )  [static]

const XMLCh * XMLUtils::GetAttributeValue ( const DOMElement *  element,
const char *  attr_name 
) [inline, static]

Returns text value of specified attribute.

Parameters:
element DOM element.
attr_name Name of attribute.
Returns:
Value of attribute.

ushort_t XMLUtils::GetSubElementsCount ( const DOMElement *  element  )  [inline, static]


The documentation for this class was generated from the following file:
Generated on Sat Oct 20 14:47:38 2007 for Dark Oberon by  doxygen 1.5.3