XmlUtils.h File Reference

#include "smbios/compat.h"
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include "ExceptionImpl.h"

Go to the source code of this file.

Namespaces

namespace  xmlutils

Defines

#define XERCES_CPP_NAMESPACE_QUALIFIER
#define DOMElement   xmlNode
#define DOMNode   xmlNode
#define DOMDocument   xmlDoc
#define DOMBuilder   int
#define SETUP_XML_NAMESPACE
#define XML_NAMESPACE
#define CHECK_VERSION_COMPAT   LIBXML_TEST_VERSION
#define xmlDocGetRootElement(doc)   xmlDocGetRootElement(const_cast<xmlDocPtr>(doc))
#define InitXML()
#define FiniXML()   do{}while(0)
#define xmlFreeParser(parser)   do{parser=0;}while(0)
#define xmlFreeDoc(doc)   do{xmlFreeDoc(doc); doc=0;}while(0)
#define InitXML()   xmlSetGenericErrorFunc(NULL, xmlutils::suppressLibxmlWarnings);
#define compatXmlReadFile(parser, doc, name)   do{UNREFERENCED_PARAMETER(parser); doc = xmlParseFile(name);}while(0)
#define compatXmlReadMemory(parser, doc, ptr, len)   do{UNREFERENCED_PARAMETER(parser); doc = xmlParseMemory(ptr, len);}while(0)

Functions

void suppressLibxmlWarnings (void *ctx, const char *msg,...)
 DECLARE_EXCEPTION (XmlUtilsException)
 DECLARE_EXCEPTION_EX (NotFound, xmlutils, XmlUtilsException)
 DECLARE_EXCEPTION_EX (Invalid, xmlutils, XmlUtilsException)
 DEFINE_EXCEPTION_EX (NotFoundImpl, xmlutils, NotFound)
 DEFINE_EXCEPTION_EX (InvalidImpl, xmlutils, Invalid)
std::string safeGetAttribute (const xmlNode *node, const std::string &attr)
XERCES_CPP_NAMESPACE_QUALIFIER
DOMBuilder * 
getParser ()
xmlNodePtr findElement (xmlNodePtr root, const std::string elementName, const std::string &attribute, const std::string &value)
xmlNodePtr findElementWithNumericAttr (xmlNodePtr root, const std::string elementName, const std::string &attribute, long value)
string getNodeText (xmlNodePtr elem)
int getNumberFromXmlAttr (xmlNodePtr element, const std::string field, int base)


Define Documentation

#define CHECK_VERSION_COMPAT   LIBXML_TEST_VERSION

Definition at line 37 of file xml_libxml2/XmlUtils.h.

#define compatXmlReadFile ( parser,
doc,
name   )     do{UNREFERENCED_PARAMETER(parser); doc = xmlParseFile(name);}while(0)

Definition at line 76 of file xml_libxml2/XmlUtils.h.

#define compatXmlReadMemory ( parser,
doc,
ptr,
len   )     do{UNREFERENCED_PARAMETER(parser); doc = xmlParseMemory(ptr, len);}while(0)

Definition at line 77 of file xml_libxml2/XmlUtils.h.

#define DOMBuilder   int

Definition at line 34 of file xml_libxml2/XmlUtils.h.

Referenced by SmbiosTableXml::setXmlFilePath().

#define DOMDocument   xmlDoc

Definition at line 33 of file xml_libxml2/XmlUtils.h.

Referenced by smbios::getBits_FromItem(), smbios::getData_UsingXml(), smbios::getSmbiosXmlDoc(), smbios::getString_FromItem(), and SmbiosTableXml::setXmlFilePath().

#define DOMElement   xmlNode

Definition at line 31 of file xml_libxml2/XmlUtils.h.

Referenced by smbios::getBits_FromItem(), smbios::getData_UsingXml(), smbios::getString_FromItem(), smbios::getStringForType(), smbios::getTypeForString(), testPlatform::testConstructionOffset1(), testPlatform::testConstructionOffset2(), testPlatform::testOutOfBounds(), and testPlatform::testVariousAccessors().

#define DOMNode   xmlNode

Definition at line 32 of file xml_libxml2/XmlUtils.h.

 
#define FiniXML (  )     do{}while(0)

Definition at line 42 of file xml_libxml2/XmlUtils.h.

 
#define InitXML (  )     xmlSetGenericErrorFunc(NULL, xmlutils::suppressLibxmlWarnings);

Definition at line 70 of file xml_libxml2/XmlUtils.h.

 
#define InitXML (  ) 

Value:

do {        \
    } while(0)

Definition at line 70 of file xml_libxml2/XmlUtils.h.

#define SETUP_XML_NAMESPACE

Definition at line 35 of file xml_libxml2/XmlUtils.h.

#define XERCES_CPP_NAMESPACE_QUALIFIER

Definition at line 30 of file xml_libxml2/XmlUtils.h.

Referenced by testPlatform::testConstructionOffset1(), testPlatform::testConstructionOffset2(), testPlatform::testOutOfBounds(), and testPlatform::testVariousAccessors().

#define XML_NAMESPACE

Definition at line 36 of file xml_libxml2/XmlUtils.h.

#define xmlDocGetRootElement ( doc   )     xmlDocGetRootElement(const_cast<xmlDocPtr>(doc))

Definition at line 38 of file xml_libxml2/XmlUtils.h.

#define xmlFreeDoc ( doc   )     do{xmlFreeDoc(doc); doc=0;}while(0)

Definition at line 44 of file xml_libxml2/XmlUtils.h.

#define xmlFreeParser ( parser   )     do{parser=0;}while(0)

Definition at line 43 of file xml_libxml2/XmlUtils.h.


Generated on Sat Apr 21 11:36:10 2007 for SMBIOS Library by  doxygen 1.5.2