Xerces-C++: DOMNode.hpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22#if !defined(XERCESC_INCLUDE_GUARD_DOMNODE_HPP)
23#define XERCESC_INCLUDE_GUARD_DOMNODE_HPP
24
26
28
29
34
140protected:
141
142
143
149
150private:
151
152
153
158
159public:
160
161
162
171
172
173
174
183 ELEMENT_NODE = 1,
184 ATTRIBUTE_NODE = 2,
185 TEXT_NODE = 3,
186 CDATA_SECTION_NODE = 4,
187 ENTITY_REFERENCE_NODE = 5,
188 ENTITY_NODE = 6,
189 PROCESSING_INSTRUCTION_NODE = 7,
190 COMMENT_NODE = 8,
191 DOCUMENT_NODE = 9,
192 DOCUMENT_TYPE_NODE = 10,
193 DOCUMENT_FRAGMENT_NODE = 11,
194 NOTATION_NODE = 12
196
216 DOCUMENT_POSITION_DISCONNECTED = 0x01,
217 DOCUMENT_POSITION_PRECEDING = 0x02,
218 DOCUMENT_POSITION_FOLLOWING = 0x04,
219 DOCUMENT_POSITION_CONTAINS = 0x08,
220 DOCUMENT_POSITION_CONTAINED_BY = 0x10,
221 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20
224
225
226
227
230
231
232
238
247
253
265
288
296
304
312
319
332
333
334
335
356
386
387
426
448
449
450
451
461
462
463
464
482
506
523 const XMLCh *version) const = 0;
524
541
549
560
595
604
623
665
666
693 void* data,
695
708
709
727
739
785
798
811
822
835
853
854
855
856
874#if defined(XML_DOMREFCOUNT_EXPERIMENTAL)
875
876
877
887 virtual void decRefCount() {}
889
890
891
892
899 virtual void incRefCount() {}
901#endif
902};
903
904
905
906
907#define GET_OWNER_DOCUMENT(ptr) \
908 ((DOMDocumentImpl*)(ptr->getOwnerDocument()))
909
910#define GET_DIRECT_MM(ptr) \
911 (ptr ? ((DOMDocumentImpl*)ptr)->getMemoryManager() : XMLPlatformUtils::fgMemoryManager)
912
913#define GET_INDIRECT_MM(ptr) \
914 (!ptr ? XMLPlatformUtils::fgMemoryManager : \
915 GET_OWNER_DOCUMENT(ptr) ? GET_OWNER_DOCUMENT(ptr)->getMemoryManager() : \
916 XMLPlatformUtils::fgMemoryManager)
917
918
919
920
921#define GetDOMNodeMemoryManager GET_INDIRECT_MM(this)
922
924
925#endif
#define CDOM_EXPORT
Definition XercesDefs.hpp:166
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
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 void setPrefix(const XMLCh *prefix)=0
Set the namespace prefix of this node.
virtual const XMLCh * lookupPrefix(const XMLCh *namespaceURI) const =0
Look up the prefix associated to the given namespace URI, starting from this node.
DOMNode(const DOMNode &)
Definition DOMNode.hpp:147
virtual void * getUserData(const XMLCh *key) const =0
Retrieves the object associated to a key on a this node.
virtual short compareDocumentPosition(const DOMNode *other) const =0
Compares the reference node, i.e.
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 * getNextSibling() const =0
Gets the node immediately following this node.
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 * getBaseURI() const =0
The absolute base URI of this node or null if undefined.
virtual bool hasAttributes() const =0
Returns whether this node (if it is an element) has any attributes.
virtual DOMNode * cloneNode(bool deep) const =0
Returns a duplicate 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 DOMNode * insertBefore(DOMNode *newChild, DOMNode *refChild)=0
Inserts the node newChild before the existing child node refChild.
virtual DOMNode * getParentNode() const =0
Gets the parent of this node.
virtual const XMLCh * getNamespaceURI() const =0
Get the namespace URI of this node, or null if it is unspecified.
virtual const XMLCh * getPrefix() const =0
Get the namespace prefix of this node, or null if it is unspecified.
virtual const XMLCh * getLocalName() const =0
Returns the local part of the qualified name of this node.
virtual DOMNode * getPreviousSibling() const =0
Gets the node immediately preceding this node.
virtual NodeType getNodeType() const =0
An enum value representing the type of the underlying object.
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...
NodeType
NodeType.
Definition DOMNode.hpp:182
virtual void release()=0
Called to indicate that this Node (and its associated children) is no longer in use and that the impl...
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 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...
virtual void * getFeature(const XMLCh *feature, const XMLCh *version) const =0
This method makes available a DOMNode's specialized interface.
virtual ~DOMNode()
Destructor.
Definition DOMNode.hpp:169
DOMNode()
Definition DOMNode.hpp:146
DocumentPosition
DocumentPosition:
Definition DOMNode.hpp:215
virtual DOMNodeList * getChildNodes() const =0
Gets a DOMNodeList that contains all children of this node.
virtual DOMNode * removeChild(DOMNode *oldChild)=0
Removes the child node indicated by oldChild from the list of children, and returns it.
virtual const XMLCh * getNodeName() const =0
The name of this node, depending on its type; see the table above.
virtual bool isSameNode(const DOMNode *other) const =0
Returns whether this node is the same node as the given one.
virtual bool isDefaultNamespace(const XMLCh *namespaceURI) const =0
This method checks if the specified namespaceURI is the default namespace or not.
virtual void * setUserData(const XMLCh *key, void *data, DOMUserDataHandler *handler)=0
Associate an object to a key on this node.
virtual void setNodeValue(const XMLCh *nodeValue)=0
Sets the value of the node.
virtual bool hasChildNodes() const =0
This is a convenience method to allow easy determination of whether a node has any children.
virtual bool isEqualNode(const DOMNode *arg) const =0
Tests whether two nodes are equal.
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...
virtual DOMNode * getLastChild() const =0
Gets the last child of this node.
virtual const XMLCh * getNodeValue() const =0
Gets the value of this node, depending on its type.
virtual void normalize()=0
Puts all DOMText nodes in the full depth of the sub-tree underneath this DOMNode, including attribute...
virtual DOMDocument * getOwnerDocument() const =0
Gets the DOMDocument object associated with this node.
When associating an object to a key on a node using setUserData the application can provide a handler...
Definition DOMUserDataHandler.hpp:40