DWFCore::DWFXMLParser Class Reference

#include <dwfcore/XMLParser.h>

Collaboration diagram for DWFCore::DWFXMLParser:

Collaboration graph
[legend]
List of all members.

Detailed Description

Provide logic to run an XML document through expat.

Since:
7.4

Definition at line 49 of file XMLParser.h.

Public Member Functions

_DWFCORE_API DWFXMLParser (DWFXMLCallback *pCallback) throw (DWFException)
virtual _DWFCORE_API ~DWFXMLParser ()
_DWFCORE_API void initializeParser ()
_DWFCORE_API void releaseParser ()
_DWFCORE_API void stopParser () throw (DWFException)
_DWFCORE_API bool isParsingFinished ()
virtual _DWFCORE_API void parseDocument (DWFInputStream &rDocumentStream) throw ( DWFException )

Static Public Member Functions

static _DWFCORE_API void XMLCALL StartElementHandler (void *pCallback, const char *zName, const char **ppAttributeList) throw ()
static _DWFCORE_API void XMLCALL EndElementHandler (void *pCallback, const char *zName) throw ()
static _DWFCORE_API void XMLCALL StartNamespaceDeclHandler (void *pCallback, const char *zPrefix, const char *zURI) throw ()
static _DWFCORE_API void XMLCALL EndNamespaceDeclHandler (void *pCallback, const char *zPrefix) throw ()
static _DWFCORE_API void XMLCALL CharacterDataHandler (void *pCallback, const char *zCData, int nLength) throw ()


Constructor & Destructor Documentation

_DWFCORE_API DWFCore::DWFXMLParser::DWFXMLParser DWFXMLCallback pCallback  )  throw (DWFException)
 

Constructor

Parameters:
pCallback A pointer to a required implementation of DWFXMLCallback
Exceptions:
DWFNullPointerException if the pCallback param is NULL
DWFMemoryException if an internal parser buffer could not be allocated

virtual _DWFCORE_API DWFCore::DWFXMLParser::~DWFXMLParser  )  [virtual]
 

Destructor


Member Function Documentation

static _DWFCORE_API void XMLCALL DWFCore::DWFXMLParser::CharacterDataHandler void *  pCallback,
const char *  zCData,
int  nLength
throw () [static]
 

Expat callback handler.

This method acts only as a router for pCallback which is required to implement DWFXMLCallback::notifyCharacterData().

Parameters:
pCallback An implementation of DWFXMLCallback.
zCData A non-null-terminated string of CDATA.
nLength The number of characters in zCData.
Exceptions:
None 

static _DWFCORE_API void XMLCALL DWFCore::DWFXMLParser::EndElementHandler void *  pCallback,
const char *  zName
throw () [static]
 

Expat callback handler.

This method acts only as a router for pCallback which is required to implement DWFXMLCallback::notifyEndElement().

Parameters:
pCallback An implementation of DWFXMLCallback.
zName The name of the element (includes any namespace prefix)
Exceptions:
None 

static _DWFCORE_API void XMLCALL DWFCore::DWFXMLParser::EndNamespaceDeclHandler void *  pCallback,
const char *  zPrefix
throw () [static]
 

Expat callback handler.

This method acts only as a router for pCallback which is required to implement DWFXMLCallback::notifyEndNamespace().

Parameters:
pCallback An implementation of DWFXMLCallback.
zPrefix The namespace prefix.
Exceptions:
None 

_DWFCORE_API void DWFCore::DWFXMLParser::initializeParser  ) 
 

Creates the internal expat parser and gets it ready for work

_DWFCORE_API bool DWFCore::DWFXMLParser::isParsingFinished  )  [inline]
 

Returns true if parsing has reached the end of the document.

Returns:
bool true if parsing has reached the end of the document.
Exceptions:
None 

Definition at line 100 of file XMLParser.h.

virtual _DWFCORE_API void DWFCore::DWFXMLParser::parseDocument DWFInputStream rDocumentStream  )  throw ( DWFException ) [virtual]
 

Call this function to process an xml stream and receive notice of various components of the stream.

Parameters:
rDocumentStream a stream providing the xml
rDocumentReader an object which receives and does something with notice of xml components

_DWFCORE_API void DWFCore::DWFXMLParser::releaseParser  ) 
 

Releases the internal expat parser. initializeParser must be called again if parsing is to restart with this same parser.

static _DWFCORE_API void XMLCALL DWFCore::DWFXMLParser::StartElementHandler void *  pCallback,
const char *  zName,
const char **  ppAttributeList
throw () [static]
 

Expat callback handler.

This method acts only as a router for pCallback which is required to implement DWFXMLCallback::notifyStartElement().

Parameters:
pCallback An implementation of DWFXMLCallback.
zName The name of the element (includes any namespace prefix)
ppAttributeList An array of null-terminated atribute name, value string pairs. The array itself is zero-terminated.
Exceptions:
None 

static _DWFCORE_API void XMLCALL DWFCore::DWFXMLParser::StartNamespaceDeclHandler void *  pCallback,
const char *  zPrefix,
const char *  zURI
throw () [static]
 

Expat callback handler.

This method acts only as a router for pCallback which is required to implement DWFXMLCallback::notifyStartNamespace().

Parameters:
pCallback An implementation of DWFXMLCallback.
zPrefix The namespace prefix.
zURI The namespace URI (may be NULL).
Exceptions:
None 

_DWFCORE_API void DWFCore::DWFXMLParser::stopParser  )  throw (DWFException)
 

Stops parsing. Can be continued later.

Exceptions:
DWFIOException if stopping generates an error


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:39:44 2009 for Autodesk DWF Core Library by  doxygen 1.4.5