00001
00002
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 #ifndef DOM_Node_HEADER_GUARD_
00062 #define DOM_Node_HEADER_GUARD_
00063
00064 #include <xercesc/util/XercesDefs.hpp>
00065 #include <xercesc/dom/DOMString.hpp>
00066
00067 class DOM_NodeList;
00068 class DOM_NamedNodeMap;
00069 class DOM_Document;
00070 class NodeImpl;
00071
00072 class DOM_NullPtr;
00073
00074
00075
00095 class CDOM_EXPORT DOM_Node {
00096
00097 public:
00108 DOM_Node();
00109
00115 DOM_Node(const DOM_Node &other);
00116
00122 DOM_Node & operator = (const DOM_Node &other);
00123
00137 DOM_Node & operator = (const DOM_NullPtr *val);
00138
00140
00147 ~DOM_Node();
00148
00150
00163 bool operator == (const DOM_Node & other)const;
00164
00170 bool operator == (const DOM_NullPtr *other) const;
00171
00176 bool operator != (const DOM_Node & other) const;
00177
00183 bool operator != (const DOM_NullPtr * other) const;
00184
00185
00186 enum NodeType {
00187 ELEMENT_NODE = 1,
00188 ATTRIBUTE_NODE = 2,
00189 TEXT_NODE = 3,
00190 CDATA_SECTION_NODE = 4,
00191 ENTITY_REFERENCE_NODE = 5,
00192 ENTITY_NODE = 6,
00193 PROCESSING_INSTRUCTION_NODE = 7,
00194 COMMENT_NODE = 8,
00195 DOCUMENT_NODE = 9,
00196 DOCUMENT_TYPE_NODE = 10,
00197 DOCUMENT_FRAGMENT_NODE = 11,
00198 NOTATION_NODE = 12,
00199 XML_DECL_NODE = 13
00200 };
00201
00203
00205
00209 DOMString getNodeName() const;
00210
00221 DOMString getNodeValue() const;
00222
00226 short getNodeType() const;
00227
00237 DOM_Node getParentNode() const;
00238
00252 DOM_NodeList getChildNodes() const;
00258 DOM_Node getFirstChild() const;
00259
00265 DOM_Node getLastChild() const;
00266
00272 DOM_Node getPreviousSibling() const;
00273
00279 DOM_Node getNextSibling() const;
00280
00285 DOM_NamedNodeMap getAttributes() const;
00286
00297 DOM_Document getOwnerDocument() const;
00298
00307 void *getUserData() const;
00308
00310
00312
00331 DOM_Node cloneNode(bool deep) const;
00332
00334
00336
00363 DOM_Node insertBefore(const DOM_Node &newChild,
00364 const DOM_Node &refChild);
00365
00366
00389 DOM_Node replaceChild(const DOM_Node &newChild,
00390 const DOM_Node &oldChild);
00402 DOM_Node removeChild(const DOM_Node &oldChild);
00403
00423 DOM_Node appendChild(const DOM_Node &newChild);
00424
00426
00428
00436 bool hasChildNodes() const;
00437
00438
00451 bool isNull() const;
00452
00454
00456
00457
00471 void setNodeValue(const DOMString &nodeValue);
00472
00490 void setUserData(void *p);
00491
00493
00495
00515 void normalize();
00516
00531 bool isSupported(const DOMString &feature,
00532 const DOMString &version) const;
00533
00548 DOMString getNamespaceURI() const;
00549
00555 DOMString getPrefix() const;
00556
00565 DOMString getLocalName() const;
00566
00598 void setPrefix(const DOMString &prefix);
00599
00605 bool hasAttributes() const;
00606
00608
00609 protected:
00610 NodeImpl *fImpl;
00611
00612 DOM_Node(NodeImpl *);
00613
00614 friend class DOM_Document;
00615 friend class DocumentImpl;
00616 friend class TreeWalkerImpl;
00617 friend class NodeIteratorImpl;
00618 friend class DOM_NamedNodeMap;
00619 friend class DOM_NodeList;
00620 friend class DOMParser;
00621 friend class DOM_Entity;
00622 friend class RangeImpl;
00623 friend class CharacterDataImpl;
00624 friend class XUtil;
00625
00626 };
00627
00628
00629 #endif
00630