BOSS 7.0.2
BESIII Offline Software System
|
#include <Dom.h>
Static Public Member Functions | |
static DOMElement * | findFirstChildByName (const DOMElement *parent, const char *const name) |
static DOMElement * | findFirstChildByName (const DOMElement *parent, const std::string name) |
static DOMElement * | getSiblingElement (const DOMNode *child) |
Return next element sibling, if any. | |
static DOMElement * | getFirstChildElement (const DOMNode *parent) |
Get first child which is an element node, if any. | |
static DOMElement * | getElementById (const DOMDocument *doc, const std::string &id) |
static std::string | getNodeName (const DOMNode *elt) |
static std::string | getTagName (const DOMElement *node) |
static bool | checkTagName (const DOMElement *element, const std::string &tagName) |
static void | getChildrenByTagName (const DOMElement *parent, const std::string &tagName, std::vector< DOMElement * > &children, bool clear=true) |
static void | getDescendantsByTagName (const DOMElement *parent, const std::string &tagName, std::vector< DOMElement * > &children, bool clear=true) |
static void | getAttributeNodeMap (const DOMNode *elt, std::map< std::string, DOMNode * > &atts, bool clear=true) |
static bool | hasAttribute (const DOMNode *elt, const char *attName) |
static std::string | getAttribute (const DOMElement *elt, const char *attName) |
static std::string | getAttribute (const DOMElement *elt, std::string attName) |
static std::string | getAttribute (const DOMNode *elt, const char *attName) |
static std::string | getAttribute (const DOMNode *elt, std::string attName) |
static double | getDoubleAttribute (const DOMNode *elt, std::string attName) |
static unsigned | getDoublesAttribute (const DOMNode *elt, std::string attName, std::vector< double > &values, bool clear=true) |
static unsigned | getFloatsAttribute (const DOMNode *elt, std::string attName, std::vector< float > &values, bool clear=true) |
static int | getIntAttribute (const DOMNode *elt, std::string attName) |
static unsigned | getIntsAttribute (const DOMNode *elt, std::string attName, std::vector< int > &values, bool clear=true) |
static std::string | getText (const DOMNode *textNode) |
static std::string | getTextContent (const DOMElement *elt) |
static void | addAttribute (DOMElement *elt, std::string name, double value) |
Add attribute of type double to a DOM element, DOMString att name. | |
static void | addAttribute (DOMElement *elt, std::string name, int value) |
Add attribute of type int to a DOM element. | |
static void | addAttribute (DOMElement *elt, std::string name, unsigned int value) |
Add attribute of type unsigned int to a DOM element. | |
static void | addAttribute (DOMElement *elt, std::string name, std::string value) |
Add an attribute of type string to a DOM element. | |
static void | addAttribute (DOMElement *elt, std::string name, const char *const value) |
Add an attribute of type char* to a DOM element. | |
static void | printElement (DOMNode *elt, std::ostream &out) |
static void | prettyPrintElement (DOMNode *elt, std::ostream &out, std::string prefix) |
static void | prune (DOMElement *elt) |
static DOMElement * | findFirstChildByName (const DOMElement *parent, const char *const name) |
static DOMElement * | findFirstChildByName (const DOMElement *parent, const std::string name) |
static DOMElement * | getSiblingElement (const DOMNode *child) |
Return next element sibling, if any. | |
static DOMElement * | getFirstChildElement (const DOMNode *parent) |
Get first child which is an element node, if any. | |
static DOMElement * | getElementById (const DOMDocument *doc, const std::string &id) |
static std::string | getNodeName (const DOMNode *elt) |
static std::string | getTagName (const DOMElement *node) |
static bool | checkTagName (const DOMElement *element, const std::string &tagName) |
static void | getChildrenByTagName (const DOMElement *parent, const std::string &tagName, std::vector< DOMElement * > &children, bool clear=true) |
static void | getDescendantsByTagName (const DOMElement *parent, const std::string &tagName, std::vector< DOMElement * > &children, bool clear=true) |
static void | getAttributeNodeMap (const DOMNode *elt, std::map< std::string, DOMNode * > &atts, bool clear=true) |
static bool | hasAttribute (const DOMNode *elt, const char *attName) |
static std::string | getAttribute (const DOMElement *elt, const char *attName) |
static std::string | getAttribute (const DOMElement *elt, std::string attName) |
static std::string | getAttribute (const DOMNode *elt, const char *attName) |
static std::string | getAttribute (const DOMNode *elt, std::string attName) |
static double | getDoubleAttribute (const DOMNode *elt, std::string attName) |
static unsigned | getDoublesAttribute (const DOMNode *elt, std::string attName, std::vector< double > &values, bool clear=true) |
static unsigned | getFloatsAttribute (const DOMNode *elt, std::string attName, std::vector< float > &values, bool clear=true) |
static int | getIntAttribute (const DOMNode *elt, std::string attName) |
static unsigned | getIntsAttribute (const DOMNode *elt, std::string attName, std::vector< int > &values, bool clear=true) |
static std::string | getText (const DOMNode *textNode) |
static std::string | getTextContent (const DOMElement *elt) |
static void | addAttribute (DOMElement *elt, std::string name, double value) |
Add attribute of type double to a DOM element, DOMString att name. | |
static void | addAttribute (DOMElement *elt, std::string name, int value) |
Add attribute of type int to a DOM element. | |
static void | addAttribute (DOMElement *elt, std::string name, unsigned int value) |
Add attribute of type unsigned int to a DOM element. | |
static void | addAttribute (DOMElement *elt, std::string name, std::string value) |
Add an attribute of type string to a DOM element. | |
static void | addAttribute (DOMElement *elt, std::string name, const char *const value) |
Add an attribute of type char* to a DOM element. | |
static void | printElement (DOMNode *elt, std::ostream &out) |
static void | prettyPrintElement (DOMNode *elt, std::ostream &out, std::string prefix) |
static void | prune (DOMElement *elt) |
This class is just a convenient place for some static functions and a static buffer to be used as temp space for transcoding which beef up the DOM interface a bit
Definition at line 80 of file Calibration/xmlBase/xmlBase-00-00-03/xmlBase/Dom.h.
|
static |
Add an attribute of type char*
to a DOM element.
Definition at line 500 of file Dom.cxx.
|
static |
Add an attribute of type char*
to a DOM element.
|
static |
Add attribute of type double to a DOM element, DOMString att name.
Add attribute of type double to a DOM element, std::string att name
Definition at line 392 of file Dom.cxx.
Referenced by addAttribute().
|
static |
Add attribute of type double to a DOM element, DOMString att name.
Add attribute of type double to a DOM element, std::string att name
|
static |
Add attribute of type int
to a DOM element.
Definition at line 426 of file Dom.cxx.
|
static |
Add attribute of type int
to a DOM element.
|
static |
Add an attribute of type string
to a DOM element.
Definition at line 529 of file Dom.cxx.
|
static |
Add an attribute of type string
to a DOM element.
|
static |
Add attribute of type unsigned
int
to a DOM element.
Definition at line 464 of file Dom.cxx.
|
static |
Add attribute of type unsigned
int
to a DOM element.
|
static |
See if element has expected tag name or not. Throws NullNode exception if argument is null
Definition at line 146 of file Dom.cxx.
Referenced by XmlBaseCnv::findNextDacCol(), and getChildrenByTagName().
|
static |
See if element has expected tag name or not. Throws NullNode exception if argument is null
|
static |
Find first child with given tagname. Only immediate children qualify.
parent | Element whose child is to be found |
name | name to look for (may be *, in which case first child, whatever its tagname, will be returned) |
Definition at line 60 of file Dom.cxx.
Referenced by findFirstChildByName(), XmlBaseCnv::findFirstDacCol(), getFirstChildElement(), main(), and prune().
|
static |
Find first child with given tagname. Only immediate children qualify.
parent | Element whose child is to be found |
name | name to look for (may be *, in which case first child, whatever its tagname, will be returned) |
|
static |
Definition at line 88 of file Dom.cxx.
|
static |
|
static |
Return std::string form of attribute value (standard DOM interface deals only in DOMString type). Return null string if attribute isn't found.
Definition at line 222 of file Dom.cxx.
Referenced by getAttribute(), getDoubleAttribute(), getDoublesAttribute(), getFloatsAttribute(), getIntAttribute(), getIntsAttribute(), rdbModel::MysqlConnection::open(), prettyPrintElement(), and printElement().
|
static |
Return std::string form of attribute value (standard DOM interface deals only in DOMString type). Return null string if attribute isn't found.
|
static |
Return std::string form of attribute value (standard DOM interface deals only in DOMString type). Return null string if attribute isn't found.
Definition at line 240 of file Dom.cxx.
|
static |
Return std::string form of attribute value (standard DOM interface deals only in DOMString type). Return null string if attribute isn't found.
|
static |
Return std::string form of attribute value (standard DOM interface deals only in DOMString type) or null if elt is not a DOM_Element or attribute is not found.
Definition at line 246 of file Dom.cxx.
|
static |
Return std::string form of attribute value (standard DOM interface deals only in DOMString type) or null if elt is not a DOM_Element or attribute is not found.
|
static |
Return std::string form of attribute value (standard DOM interface deals only in DOMString type) or null if elt is not a DOM_Element or attribute isn't found
|
static |
Return std::string form of attribute value (standard DOM interface deals only in DOMString type) or null if elt is not a DOM_Element or attribute isn't found
|
static |
Fill supplied map with all attribute nodes, where key is attribute name. By default clear map first.
Definition at line 196 of file Dom.cxx.
Referenced by prettyPrintElement(), and printElement().
|
static |
Fill supplied map with all attribute nodes, where key is attribute name. By default clear map first.
|
static |
Fill supplied vector with all (immediate) child elements matching requested tagname. If tagName == "*" returns all immediate children. By default clear vector first.
Definition at line 160 of file Dom.cxx.
|
static |
Fill supplied vector with all (immediate) child elements matching requested tagname. If tagName == "*" returns all immediate children. By default clear vector first.
|
static |
Fill supplied vector with all descendant elements matching requested tagname. if tagNmae = "*" returns all descendant elements. By default clear vector first.
Definition at line 178 of file Dom.cxx.
|
static |
Fill supplied vector with all descendant elements matching requested tagname. if tagNmae = "*" returns all descendant elements. By default clear vector first.
|
static |
Return double attribute value. Throw exception if 1) not element node 2) attribute doesn't exist 3) value isn't really a double
Definition at line 263 of file Dom.cxx.
Referenced by main(), and XmlBaseCnv::processValSig().
|
static |
Return double attribute value. Throw exception if 1) not element node 2) attribute doesn't exist 3) value isn't really a double
|
static |
Return doubles in user-supplied vector. Attribute value should be a string consisting of valid ascii representation of floating point numbers, separated by blanks; else the method will throw an exception (xml::WrongAttributeType)
Definition at line 279 of file Dom.cxx.
Referenced by main().
|
static |
Return doubles in user-supplied vector. Attribute value should be a string consisting of valid ascii representation of floating point numbers, separated by blanks; else the method will throw an exception (xml::WrongAttributeType)
|
static |
|
static |
|
static |
Get first child which is an element node, if any.
Definition at line 115 of file Dom.cxx.
Referenced by getChildrenByTagName(), and xmlBase::DocMan::parse().
|
static |
Get first child which is an element node, if any.
|
static |
Return doubles in user-supplied vector. Attribute value should be a string consisting of valid ascii representation of floating point numbers, separated by blanks; else the method will throw an exception (xml::WrongAttributeType)
Definition at line 302 of file Dom.cxx.
Referenced by XmlBaseCnv::processValSigs().
|
static |
Return doubles in user-supplied vector. Attribute value should be a string consisting of valid ascii representation of floating point numbers, separated by blanks; else the method will throw an exception (xml::WrongAttributeType)
|
static |
Return int attribute value. Throw exception if 1) not element node 2) attribute doesn't exist 3) value isn't really an int
Definition at line 326 of file Dom.cxx.
Referenced by main().
|
static |
Return int attribute value. Throw exception if 1) not element node 2) attribute doesn't exist 3) value isn't really an int
|
static |
Return ints in user-supplied vector. Attribute value should be a string consisting of valid ascii representation of floating point numbers, separated by blanks; else the method will throw an exception (xml::WrongAttributeType)
Definition at line 342 of file Dom.cxx.
Referenced by main().
|
static |
Return ints in user-supplied vector. Attribute value should be a string consisting of valid ascii representation of floating point numbers, separated by blanks; else the method will throw an exception (xml::WrongAttributeType)
|
static |
Create std::string holding node name (if that makes sense for this node). Throws NullNode exception if argument is null
Definition at line 128 of file Dom.cxx.
Referenced by getAttributeNodeMap(), getTagName(), prettyPrintElement(), and printElement().
|
static |
Create std::string holding node name (if that makes sense for this node). Throws NullNode exception if argument is null
|
static |
Return next element sibling, if any.
DOM api doesn't provide a direct way to get next sibling which is also an element.
Definition at line 96 of file Dom.cxx.
Referenced by XmlBaseCnv::findNextDacCol(), getChildrenByTagName(), xmlBase::DocMan::parse(), and prune().
|
static |
Return next element sibling, if any.
DOM api doesn't provide a direct way to get next sibling which is also an element.
|
static |
Create std::string holding tag name (= node name for the base DomNode). Throws NullNode exception if argument is null.
Definition at line 142 of file Dom.cxx.
Referenced by xmlBase::DocMan::parse().
|
static |
Create std::string holding tag name (= node name for the base DomNode). Throws NullNode exception if argument is null.
|
static |
Return value of a text node (the text) as a standard string; throw an exception if it's not a text-type node (TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE are ok)
Definition at line 366 of file Dom.cxx.
Referenced by getTextContent(), prettyPrintElement(), and printElement().
|
static |
Return value of a text node (the text) as a standard string; throw an exception if it's not a text-type node (TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE are ok)
|
static |
Return value of text node (the text) for text node which is child of the supplied element argument. Element should have only text content, not mixed content.
Definition at line 385 of file Dom.cxx.
|
static |
Return value of text node (the text) for text node which is child of the supplied element argument. Element should have only text content, not mixed content.
|
static |
Return true if arg is valid element and has specified attribute, else false
Definition at line 210 of file Dom.cxx.
|
static |
Return true if arg is valid element and has specified attribute, else false
|
static |
(Re)serialize and output a DOM node and its children to the specified stream.
To output an entire document, invoke this routine with the document element as first argument.
This routine works best for DOM representations which do not already include formatting (end-of-lines and indentation).
Definition at line 644 of file Dom.cxx.
Referenced by main(), and prettyPrintElement().
|
static |
(Re)serialize and output a DOM node and its children to the specified stream.
To output an entire document, invoke this routine with the document element as first argument.
This routine works best for DOM representations which do not already include formatting (end-of-lines and indentation).
|
static |
(Re)serialize and output a DOM node and its children to the specified stream.
To output an entire document, invoke this routine with the document element as first argument.
This routine works best for DOM representations which already include formatting (end-of-lines and indentation).
Definition at line 570 of file Dom.cxx.
Referenced by main(), and printElement().
|
static |
(Re)serialize and output a DOM node and its children to the specified stream.
To output an entire document, invoke this routine with the document element as first argument.
This routine works best for DOM representations which already include formatting (end-of-lines and indentation).
|
static |
Utility to remove all children of elt (but not elt itself).
Definition at line 732 of file Dom.cxx.
Referenced by prune().
|
static |
Utility to remove all children of elt (but not elt itself).