22 #ifndef SHARED_CONF_XML_NODE_H 23 #define SHARED_CONF_XML_NODE_H 25 #include "common/array.h" 26 #include "common/hash-str.h" 27 #include "common/path.h" 28 #include "common/str.h" 29 #include "common/util.h" 47 static void parseDocTypeElement(
const Common::String &s,
size_t &nn);
65 XMLNode(
const XMLNode &n) : _tree(n._tree), _parent(n._parent), _id(n._id),
66 _text(n._text), _nodeList(n._nodeList), _noClose(
false) {}
72 _nodeList = n._nodeList;
73 _noClose = n._noClose;
86 bool nodeIsText()
const {
87 return !_text.empty();
92 bool hasChildren()
const {
93 return !_nodeList.
empty();
96 return _nodeList.
empty() ? nullptr : _nodeList[0];
102 return _attributes.
contains(attrName);
105 return _attributes.
contains(attrName) ? _attributes[attrName] :
"";
108 return _attributes.
contains(attrName) ? atol(_attributes[attrName].c_str()) : 0;
111 if (_attributes.
contains(attrName)) {
113 return toupper(str[0]) ==
'T' || str ==
"1";
119 return getProperty(attrName);
145 bool longformat =
true)
const;
Definition: xml_tree.h:36
Definition: xml_node.h:36
XMLNode * getPrior() const
bool searchPairs(KeyTypeList &ktl, const Common::String &basekey, const Common::String currkey, const unsigned int pos)
Definition: detection.h:27
bool empty() const
Definition: array.h:351
XMLNode * getNext() const
bool contains(const Key &key) const
Definition: hashmap.h:594