#include <xmlbase.h>

Public Member Functions | |
| XmlBase (MessageLog *pLog=NULL) | |
| virtual | ~XmlBase () |
| void | logError (const XERCES_CPP_NAMESPACE_QUALIFIER DOMError &exc) |
Static Public Member Functions | |
| static std::string | URLtoPath (const XMLCh *pUrl) |
| static std::string | PathToURL (const std::string &path) |
| static XMLByte * | encodeBase64 (const unsigned int *pData, XMLSize_t size, XMLSize_t *pOutLen=NULL, std::string *pChecksum=NULL) |
| static unsigned int * | decodeBase64 (const XMLByte *pData, XMLSize_t size=0, const std::string &checksum=std::string()) |
Static Public Attributes | |
| static const unsigned int | VERSION |
Protected Member Functions | |
| void | logException (const XERCES_CPP_NAMESPACE_QUALIFIER XMLException *pExc) |
| void | logException (const XERCES_CPP_NAMESPACE_QUALIFIER DOMException *pExc) |
| void | logException (const XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException *pExc, std::string severity) |
| void | logSimpleMessage (std::string msg) |
Static Protected Attributes | |
| static const char * | sNamespaceId |
Classes | |
| class | XmlException |
| This class represents an exception thrown by the XML classes. More... | |
Definition at line 145 of file xmlbase.h.
| XmlBase::XmlBase | ( | MessageLog * | pLog = NULL |
) |
Construct a new XML processor.
Constructing an XmlBase is not particularly useful as most functionality will be in derived classes.
| pLog | If this optional MessageLog is passed in, any errors encountered during processing will be logged. |
| XmlException | When Xerces fails to initialize. |
| virtual XmlBase::~XmlBase | ( | ) | [virtual] |
Destroy and cleanup the XML processor.
| static std::string XmlBase::URLtoPath | ( | const XMLCh * | pUrl | ) | [static] |
This function will convert a file:// URL to a path.
It handles Windows drive letters reasonably; however, you will not be able to refer to paths such as /c:/ on UNIX.
| pUrl | The URL to convert to a path. This is passed in as a Unicode string as the most often used pattern is to read an attribute or element value and immediately convert to a path. |
| static std::string XmlBase::PathToURL | ( | const std::string & | path | ) | [static] |
This function will convert a path to a file:// URL.
It handles Windows drive letters reasonably; however, you will not be able to refer to paths such as /c:/ on UNIX.
| path | The path to convert to a URL. |
| static XMLByte* XmlBase::encodeBase64 | ( | const unsigned int * | pData, | |
| XMLSize_t | size, | |||
| XMLSize_t * | pOutLen = NULL, |
|||
| std::string * | pChecksum = NULL | |||
| ) | [static] |
Encode data in base 64 representation.
| pData | This is the data which will be encoded. | |
| size | The number of items in data | |
| pOutLen | Optional output parameter which returns the length of the output byte array. | |
| pChecksum | Optional output parameter which returns a CCITT checksum. |
| static unsigned int* XmlBase::decodeBase64 | ( | const XMLByte * | pData, | |
| XMLSize_t | size = 0, |
|||
| const std::string & | checksum = std::string() | |||
| ) | [static] |
Decode data in base 64 representation.
| pData | This is the Unicode representation of the base 64 encoded data. | |
| size | The expected number of data items or 0 if size is unknown. | |
| checksum | The CCITT checksum to verify. To skip verification, set this to an empty string. |
| void XmlBase::logError | ( | const XERCES_CPP_NAMESPACE_QUALIFIER DOMError & | exc | ) |
Log a Xerces DOM error to the message log, if one is available.
| exc | The exception to log. |
| void XmlBase::logException | ( | const XERCES_CPP_NAMESPACE_QUALIFIER XMLException * | pExc | ) | [protected] |
Log an XML exception to the message log, if one is available.
| pExc | The exception to log. |
| void XmlBase::logException | ( | const XERCES_CPP_NAMESPACE_QUALIFIER DOMException * | pExc | ) | [protected] |
Log a Xerces DOM exception to the message log, if one is available.
| pExc | The exception to log. |
| void XmlBase::logException | ( | const XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException * | pExc, | |
| std::string | severity | |||
| ) | [protected] |
Log a Xerces SAX exception to the message log, if one is available.
| pExc | The exception to log. | |
| severity | A severity which is also logged. SAX exceptions may not be fatal and this is a way to inform the uses of the exception severity. |
| void XmlBase::logSimpleMessage | ( | std::string | msg | ) | [protected] |
Log a string message to the message log, if one is available.
| msg | The message to log. |
const unsigned int XmlBase::VERSION [static] |
const char* XmlBase::sNamespaceId [static, protected] |