39 #ifndef OME_COMMON_XML_DOM_NODE_H
40 #define OME_COMMON_XML_DOM_NODE_H
42 #include <ome/common/config.h>
44 #include <ome/common/xml/String.h>
45 #include <ome/common/xml/dom/Base.h>
46 #include <ome/common/xml/dom/NodeList.h>
47 #include <ome/common/xml/dom/NamedNodeMap.h>
48 #include <ome/common/xml/dom/Wrapper.h>
50 #include <xercesc/dom/DOMNode.hpp>
68 class Node :
public Wrapper<xercesc::DOMNode, Base<xercesc::DOMNode> >
78 Wrapper<xercesc::DOMNode,
Base<xercesc::DOMNode> >()
88 Wrapper<xercesc::DOMNode,
Base<xercesc::DOMNode> >(node)
98 Node (xercesc::DOMNode *node,
100 Wrapper<xercesc::DOMNode,
Base<xercesc::DOMNode> >(managed ?
123 return Node((*this)->appendChild(node.
get()),
false);
134 return (*this)->getNodeType();
145 return NodeList((*this)->getChildNodes());
167 return String((*this)->getNodeValue());
178 return String((*this)->getTextContent());
187 #endif // OME_COMMON_XML_DOM_NODE_H
NamedNodeMap getAttributes()
Get node attributes.
Definition: Node.h:154
Xerces DOM class wrapper.
Definition: Wrapper.h:72
Node appendChild(Node &node)
Append a child Node.
Definition: Node.h:118
DOM Node wrapper.
Definition: Node.h:68
xercesc::DOMNode::NodeType node_type
The derived object type of a node.
Definition: Node.h:72
Node(const Node &node)
Copy construct a Node.
Definition: Node.h:87
Node()
Construct a NULL Node.
Definition: Node.h:77
~Node()
Destructor.
Definition: Node.h:107
std::string getNodeValue()
Get node value.
Definition: Node.h:165
NodeList getChildNodes()
Get child nodes.
Definition: Node.h:143
DOM NamedNodeMap wrapper.
Definition: NamedNodeMap.h:69
node_type getNodeType()
Get the object type of this node.
Definition: Node.h:132
Base of the DOM wrapper hierarchy.
Definition: Base.h:76
xercesc::DOMNode base_element_type
Base element type (root type of the wrapped type).
Definition: Base.h:82
Xerces string wrapper.
Definition: String.h:74
DOM NodeList wrapper.
Definition: NodeList.h:69
Node(xercesc::DOMNode *node, bool managed)
Construct a Node from a xercesc::DOMNode *.
Definition: Node.h:98
std::string getTextContent()
Get node text content.
Definition: Node.h:176
element_type * get()
Get wrapped element_type *.
Definition: Wrapper.h:155