00001 #ifndef DOMNode_HEADER_GUARD_
00002 #define DOMNode_HEADER_GUARD_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 #include <xercesc/util/XercesDefs.hpp>
00065
00066 XERCES_CPP_NAMESPACE_BEGIN
00067
00068
00069 class DOMDocument;
00070 class DOMNamedNodeMap;
00071 class DOMNodeList;
00072 class DOMUserDataHandler;
00073
00185 class DOMNode {
00186 protected:
00187
00188
00189
00192 DOMNode() {};
00194
00195 private:
00196
00197
00198
00201 DOMNode(const DOMNode &);
00202 DOMNode & operator = (const DOMNode &);
00204
00205 public:
00206
00207
00208
00215 virtual ~DOMNode() {};
00217
00218
00219
00220
00228 enum NodeType {
00229 ELEMENT_NODE = 1,
00230 ATTRIBUTE_NODE = 2,
00231 TEXT_NODE = 3,
00232 CDATA_SECTION_NODE = 4,
00233 ENTITY_REFERENCE_NODE = 5,
00234 ENTITY_NODE = 6,
00235 PROCESSING_INSTRUCTION_NODE = 7,
00236 COMMENT_NODE = 8,
00237 DOCUMENT_NODE = 9,
00238 DOCUMENT_TYPE_NODE = 10,
00239 DOCUMENT_FRAGMENT_NODE = 11,
00240 NOTATION_NODE = 12
00241 };
00242
00269 enum DOMTreePosition {
00270 TREE_POSITION_PRECEDING = 0x01,
00271 TREE_POSITION_FOLLOWING = 0x02,
00272 TREE_POSITION_ANCESTOR = 0x04,
00273 TREE_POSITION_DESCENDANT = 0x08,
00274 TREE_POSITION_EQUIVALENT = 0x10,
00275 TREE_POSITION_SAME_NODE = 0x20,
00276 TREE_POSITION_DISCONNECTED = 0x00
00277 };
00279
00280
00281
00282
00285
00286
00287
00292 virtual const XMLCh * getNodeName() const = 0;
00293
00301 virtual const XMLCh * getNodeValue() const = 0;
00302
00307 virtual short getNodeType() const = 0;
00308
00319 virtual DOMNode *getParentNode() const = 0;
00320
00335 virtual DOMNodeList *getChildNodes() const = 0;
00342 virtual DOMNode *getFirstChild() const = 0;
00343
00350 virtual DOMNode *getLastChild() const = 0;
00351
00358 virtual DOMNode *getPreviousSibling() const = 0;
00359
00366 virtual DOMNode *getNextSibling() const = 0;
00367
00373 virtual DOMNamedNodeMap *getAttributes() const = 0;
00374
00386 virtual DOMDocument *getOwnerDocument() const = 0;
00387
00388
00389
00390
00410 virtual DOMNode * cloneNode(bool deep) const = 0;
00411
00439 virtual DOMNode *insertBefore(DOMNode *newChild,
00440 DOMNode *refChild) = 0;
00441
00442
00466 virtual DOMNode *replaceChild(DOMNode *newChild,
00467 DOMNode *oldChild) = 0;
00480 virtual DOMNode *removeChild(DOMNode *oldChild) = 0;
00481
00502 virtual DOMNode *appendChild(DOMNode *newChild) = 0;
00503
00504
00505
00506
00515 virtual bool hasChildNodes() const = 0;
00516
00517
00518
00519
00534 virtual void setNodeValue(const XMLCh *nodeValue) = 0;
00536
00559 virtual void normalize() = 0;
00560
00576 virtual bool isSupported(const XMLCh *feature,
00577 const XMLCh *version) const = 0;
00578
00594 virtual const XMLCh * getNamespaceURI() const = 0;
00595
00602 virtual const XMLCh * getPrefix() const = 0;
00603
00613 virtual const XMLCh * getLocalName() const = 0;
00614
00648 virtual void setPrefix(const XMLCh * prefix) = 0;
00649
00656 virtual bool hasAttributes() const = 0;
00658
00678 virtual bool isSameNode(const DOMNode* other) const = 0;
00679
00722 virtual bool isEqualNode(const DOMNode* arg) const = 0;
00723
00724
00752 virtual void* setUserData(const XMLCh* key,
00753 void* data,
00754 DOMUserDataHandler* handler) = 0;
00755
00769 virtual void* getUserData(const XMLCh* key) const = 0;
00770
00771
00790 virtual const XMLCh* getBaseURI() const = 0;
00791
00804 virtual short compareTreePosition(const DOMNode* other) const = 0;
00805
00854 virtual const XMLCh* getTextContent() const = 0;
00855
00904 virtual void setTextContent(const XMLCh* textContent) = 0;
00905
00923 virtual const XMLCh* lookupNamespacePrefix(const XMLCh* namespaceURI,
00924 bool useDefault) const = 0;
00925
00937 virtual bool isDefaultNamespace(const XMLCh* namespaceURI) const = 0;
00938
00952 virtual const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const = 0;
00953
00970 virtual DOMNode* getInterface(const XMLCh* feature) = 0;
00972
00973
00974
00975
00991 virtual void release() = 0;
00993 #if defined(XML_DOMREFCOUNT_EXPERIMENTAL)
00994
00995
00996
01006 virtual void decRefCount() {}
01008
01009
01010
01011
01018 virtual void incRefCount() {}
01020 #endif
01021 };
01022
01023 XERCES_CPP_NAMESPACE_END
01024
01025 #endif
01026