39 #ifndef OME_COMMON_XML_DOM_ELEMENT_H
40 #define OME_COMMON_XML_DOM_ELEMENT_H
44 #include <xercesc/dom/DOMElement.hpp>
46 #include <ome/common/xml/String.h>
47 #include <ome/common/xml/dom/Node.h>
48 #include <ome/common/xml/dom/Wrapper.h>
138 return (*this)->getTagName();
150 return (*this)->getElementsByTagName(
String(name));
186 const std::string& val)
200 return (*this)->getTextContent();
220 #endif // OME_COMMON_XML_DOM_ELEMENT_H
Xerces DOM class wrapper.
Definition: Wrapper.h:72
Element(const Wrapper< xercesc::DOMElement, Node >::base_type &base)
Copy construct an Element.
Definition: Element.h:92
DOM Node wrapper.
Definition: Node.h:68
void setTextContent(const std::string &val)
Set Element text content.
Definition: Element.h:209
void setAttribute(const std::string &attr, const std::string &val)
Set the specified attribute value.
Definition: Element.h:185
DOM Element wrapper.
Definition: Element.h:66
Element(Wrapper< xercesc::DOMElement, Node >::base_element_type *base, bool managed)
Construct an Element from a xercesc::DOMNode *.
Definition: Element.h:117
NodeList getElementsByTagName(const std::string &name)
Get child elements with a given tag name.
Definition: Element.h:148
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40
~Element()
Destructor.
Definition: Element.h:126
bool hasAttribute(const std::string &attr) const
Check if the Element has the specified attribute.
Definition: Element.h:161
String getTextContent() const
Get Element text content.
Definition: Element.h:198
Element(const Element &element)
Copy construct an Element.
Definition: Element.h:82
String getAttribute(const std::string &attr) const
Get the specified attribute value.
Definition: Element.h:173
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
ome::compat::shared_ptr< base_element_type > base
Wrapped reference.
Definition: Base.h:231
DOM NodeList wrapper.
Definition: NodeList.h:69
Element()
Construct a NULL Element.
Definition: Element.h:72
Element(xercesc::DOMElement *element, bool managed)
Construct an Element from a xercesc::DOMElement *.
Definition: Element.h:103
Xerces-C modern C++ wrapper.
Definition: Base.h:53
String getTagName() const
Get Element tag name.
Definition: Element.h:136