22#if !defined(XERCESC_INCLUDE_GUARD_DOMNODE_HPP)
23#define XERCESC_INCLUDE_GUARD_DOMNODE_HPP
25#include <xercesc/util/XercesDefs.hpp>
27XERCES_CPP_NAMESPACE_BEGIN
33class DOMUserDataHandler;
523 const XMLCh *version)
const = 0;
810 virtual const XMLCh*
lookupPrefix(
const XMLCh* namespaceURI)
const = 0;
851 virtual void*
getFeature(
const XMLCh* feature,
const XMLCh* version)
const = 0;
874#if defined(XML_DOMREFCOUNT_EXPERIMENTAL)
887 virtual void decRefCount() {}
899 virtual void incRefCount() {}
907#define GET_OWNER_DOCUMENT(ptr) \
908 ((DOMDocumentImpl*)(ptr->getOwnerDocument()))
910#define GET_DIRECT_MM(ptr) \
911 (ptr ? ((DOMDocumentImpl*)ptr)->getMemoryManager() : XMLPlatformUtils::fgMemoryManager)
913#define GET_INDIRECT_MM(ptr) \
914 (!ptr ? XMLPlatformUtils::fgMemoryManager : \
915 GET_OWNER_DOCUMENT(ptr) ? GET_OWNER_DOCUMENT(ptr)->getMemoryManager() : \
916 XMLPlatformUtils::fgMemoryManager)
921#define GetDOMNodeMemoryManager GET_INDIRECT_MM(this)
923XERCES_CPP_NAMESPACE_END
The DOMDocument interface represents the entire XML document.
Definition DOMDocument.hpp:67
DOMNamedNodeMaps are used to represent collections of nodes that can be accessed by name.
Definition DOMNamedNodeMap.hpp:45
The DOMNodeList interface provides the abstraction of an ordered collection of nodes.
Definition DOMNodeList.hpp:45
The DOMNode interface is the primary datatype for the entire Document Object Model.
Definition DOMNode.hpp:139
virtual const XMLCh * lookupPrefix(const XMLCh *namespaceURI) const =0
Look up the prefix associated to the given namespace URI, starting from this node.
virtual const XMLCh * getPrefix() const =0
Get the namespace prefix of this node, or null if it is unspecified.
virtual void release()=0
Called to indicate that this Node (and its associated children) is no longer in use and that the impl...
virtual void * getFeature(const XMLCh *feature, const XMLCh *version) const =0
This method makes available a DOMNode's specialized interface.
virtual const XMLCh * lookupNamespaceURI(const XMLCh *prefix) const =0
Look up the namespace URI associated to the given prefix, starting from this node.
virtual const XMLCh * getNodeValue() const =0
Gets the value of this node, depending on its type.
DOMNode()
Definition DOMNode.hpp:146
virtual DOMNode * removeChild(DOMNode *oldChild)=0
Removes the child node indicated by oldChild from the list of children, and returns it.
virtual bool isSupported(const XMLCh *feature, const XMLCh *version) const =0
Tests whether the DOM implementation implements a specific feature and that feature is supported by t...
DOMNode(const DOMNode &)
Definition DOMNode.hpp:147
virtual bool hasChildNodes() const =0
This is a convenience method to allow easy determination of whether a node has any children.
virtual NodeType getNodeType() const =0
An enum value representing the type of the underlying object.
virtual DOMNode * getNextSibling() const =0
Gets the node immediately following this node.
virtual void * setUserData(const XMLCh *key, void *data, DOMUserDataHandler *handler)=0
Associate an object to a key on this node.
virtual bool isSameNode(const DOMNode *other) const =0
Returns whether this node is the same node as the given one.
virtual const XMLCh * getTextContent() const =0
WARNING: This method is known to be buggy and does not produce accurate results under a variety of co...
virtual void setNodeValue(const XMLCh *nodeValue)=0
Sets the value of the node.
virtual DOMNode * replaceChild(DOMNode *newChild, DOMNode *oldChild)=0
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node...
virtual DOMNode * getPreviousSibling() const =0
Gets the node immediately preceding this node.
virtual void * getUserData(const XMLCh *key) const =0
Retrieves the object associated to a key on a this node.
virtual const XMLCh * getBaseURI() const =0
The absolute base URI of this node or null if undefined.
virtual DOMNode * getParentNode() const =0
Gets the parent of this node.
virtual void setTextContent(const XMLCh *textContent)=0
This attribute removes any possible children this node may have and, if the new string is not empty o...
DocumentPosition
DocumentPosition:
Definition DOMNode.hpp:215
@ DOCUMENT_POSITION_DISCONNECTED
Definition DOMNode.hpp:216
@ DOCUMENT_POSITION_CONTAINS
Definition DOMNode.hpp:219
@ DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
Definition DOMNode.hpp:221
@ DOCUMENT_POSITION_PRECEDING
Definition DOMNode.hpp:217
@ DOCUMENT_POSITION_CONTAINED_BY
Definition DOMNode.hpp:220
@ DOCUMENT_POSITION_FOLLOWING
Definition DOMNode.hpp:218
virtual const XMLCh * getLocalName() const =0
Returns the local part of the qualified name of this node.
virtual const XMLCh * getNamespaceURI() const =0
Get the namespace URI of this node, or null if it is unspecified.
virtual bool isDefaultNamespace(const XMLCh *namespaceURI) const =0
This method checks if the specified namespaceURI is the default namespace or not.
virtual bool hasAttributes() const =0
Returns whether this node (if it is an element) has any attributes.
virtual void normalize()=0
Puts all DOMText nodes in the full depth of the sub-tree underneath this DOMNode, including attribute...
virtual DOMNode * insertBefore(DOMNode *newChild, DOMNode *refChild)=0
Inserts the node newChild before the existing child node refChild.
NodeType
NodeType.
Definition DOMNode.hpp:182
@ ENTITY_NODE
Definition DOMNode.hpp:188
@ ATTRIBUTE_NODE
Definition DOMNode.hpp:184
@ DOCUMENT_NODE
Definition DOMNode.hpp:191
@ ENTITY_REFERENCE_NODE
Definition DOMNode.hpp:187
@ ELEMENT_NODE
Definition DOMNode.hpp:183
@ DOCUMENT_TYPE_NODE
Definition DOMNode.hpp:192
@ DOCUMENT_FRAGMENT_NODE
Definition DOMNode.hpp:193
@ CDATA_SECTION_NODE
Definition DOMNode.hpp:186
@ PROCESSING_INSTRUCTION_NODE
Definition DOMNode.hpp:189
@ NOTATION_NODE
Definition DOMNode.hpp:194
@ TEXT_NODE
Definition DOMNode.hpp:185
@ COMMENT_NODE
Definition DOMNode.hpp:190
virtual DOMDocument * getOwnerDocument() const =0
Gets the DOMDocument object associated with this node.
virtual DOMNodeList * getChildNodes() const =0
Gets a DOMNodeList that contains all children of this node.
virtual DOMNode * cloneNode(bool deep) const =0
Returns a duplicate of this node.
virtual DOMNode * appendChild(DOMNode *newChild)=0
Adds the node newChild to the end of the list of children of this node.
virtual DOMNode * getFirstChild() const =0
Gets the first child of this node.
virtual short compareDocumentPosition(const DOMNode *other) const =0
Compares the reference node, i.e.
virtual DOMNode * getLastChild() const =0
Gets the last child of this node.
virtual void setPrefix(const XMLCh *prefix)=0
Set the namespace prefix of this node.
virtual DOMNamedNodeMap * getAttributes() const =0
Gets a DOMNamedNodeMap containing the attributes of this node (if it is an DOMElement) or null otherw...
virtual bool isEqualNode(const DOMNode *arg) const =0
Tests whether two nodes are equal.
virtual ~DOMNode()
Destructor.
Definition DOMNode.hpp:169
virtual const XMLCh * getNodeName() const =0
The name of this node, depending on its type; see the table above.
When associating an object to a key on a node using setUserData the application can provide a handler...
Definition DOMUserDataHandler.hpp:40