6#include <xercesc/util/XercesDefs.hpp>
8XERCES_CPP_NAMESPACE_BEGIN
11class XMLLCPTranscoder;
14XERCES_CPP_NAMESPACE_END
32 m_name(
"DomException"), m_extra(extraInfo) {}
35 std::string msg =
m_name +
": " + m_extra;
37 virtual const char*
what() {
38 return m_extra.c_str();
58 m_name =
"WrongAttributeType";
74 using XERCES_CPP_NAMESPACE_QUALIFIER DOMElement;
75 using XERCES_CPP_NAMESPACE_QUALIFIER DOMNode;
76 using XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument;
91 const char*
const name);
93 const std::string name);
105 const std::string&
id);
109 static std::string
getNodeName(
const DOMNode* elt);
113 static std::string
getTagName(
const DOMElement* node);
119 const std::string& tagName);
125 const std::string& tagName,
126 std::vector<DOMElement*>& children,
133 const std::string& tagName,
134 std::vector<DOMElement*>& children,
140 std::map<std::string, DOMNode*>& atts,
145 static bool hasAttribute(
const DOMNode* elt,
const char* attName);
151 const char* attName);
156 std::string attName);
162 const char* attName);
167 std::string attName);
180 std::vector<double>& values,
190 std::vector<float>& values,
204 std::vector<int>& values,
210 static std::string
getText(
const DOMNode* textNode);
222 static void addAttribute(DOMElement* elt, std::string name,
226 static void addAttribute(DOMElement* elt, std::string name,
230 static void addAttribute(DOMElement* elt, std::string name,
234 static void addAttribute(DOMElement* elt, std::string name,
238 static void addAttribute(DOMElement* elt, std::string name,
239 const char *
const value);
252 static void printElement(DOMNode* elt, std::ostream& out);
267 static void prune(DOMElement* elt);
281 static char* transToChar(
const XMLCh*
const str);
282 static char* transToChar(
const XMLCh*
const str,
unsigned int len);
287 static XMLCh* transToXMLCh(
const char*
const src);
290 static unsigned int transBufSize;
291 static char* transBuf;
292 static unsigned int xmlchBufSize;
293 static XMLCh* xmlchBuf;
294 static XERCES_CPP_NAMESPACE_QUALIFIER XMLLCPTranscoder* transcoder;
295 static int initTrans();
297 static XMLCh* xmlchStar;
Base exception class for Dom.
DomException(const std::string &extraInfo="")
virtual std::string getMsg()
virtual const char * what()
static std::string getTagName(const DOMElement *node)
static void getChildrenByTagName(const DOMElement *parent, const std::string &tagName, std::vector< DOMElement * > &children, bool clear=true)
static void addAttribute(DOMElement *elt, std::string name, double value)
Add attribute of type double to a DOM element, DOMString att name.
static int getIntAttribute(const DOMNode *elt, std::string attName)
static DOMElement * getSiblingElement(const DOMNode *child)
Return next element sibling, if any.
static unsigned getFloatsAttribute(const DOMNode *elt, std::string attName, std::vector< float > &values, bool clear=true)
static std::string getTextContent(const DOMElement *elt)
static void prettyPrintElement(DOMNode *elt, std::ostream &out, std::string prefix)
static void getAttributeNodeMap(const DOMNode *elt, std::map< std::string, DOMNode * > &atts, bool clear=true)
static void printElement(DOMNode *elt, std::ostream &out)
static bool hasAttribute(const DOMNode *elt, const char *attName)
static double getDoubleAttribute(const DOMNode *elt, std::string attName)
static DOMElement * getElementById(const DOMDocument *doc, const std::string &id)
static std::string getNodeName(const DOMNode *elt)
static std::string getAttribute(const DOMElement *elt, const char *attName)
static DOMElement * findFirstChildByName(const DOMElement *parent, const char *const name)
static void getDescendantsByTagName(const DOMElement *parent, const std::string &tagName, std::vector< DOMElement * > &children, bool clear=true)
static unsigned getDoublesAttribute(const DOMNode *elt, std::string attName, std::vector< double > &values, bool clear=true)
static DOMElement * getFirstChildElement(const DOMNode *parent)
Get first child which is an element node, if any.
static unsigned getIntsAttribute(const DOMNode *elt, std::string attName, std::vector< int > &values, bool clear=true)
static void prune(DOMElement *elt)
static std::string getText(const DOMNode *textNode)
static bool checkTagName(const DOMElement *element, const std::string &tagName)
NullNode(const std::string &extraInfo="")
WrongAttributeType(const std::string &extraInfo="")
virtual ~WrongAttributeType()
WrongNodeType(const std::string &extraInfo="")