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 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107
00108
00109 #ifndef DOM_Document_HEADER_GUARD_
00110 #define DOM_Document_HEADER_GUARD_
00111
00112 #include <util/XercesDefs.hpp>
00113 #include <dom/DOM_DocumentType.hpp>
00114 #include <dom/DOM_DOMImplementation.hpp>
00115 #include <dom/DOM_Element.hpp>
00116 #include <dom/DOM_DocumentFragment.hpp>
00117 #include <dom/DOM_Comment.hpp>
00118 #include <dom/DOM_CDATASection.hpp>
00119 #include <dom/DOM_ProcessingInstruction.hpp>
00120 #include <dom/DOM_Attr.hpp>
00121 #include <dom/DOM_Entity.hpp>
00122 #include <dom/DOM_EntityReference.hpp>
00123 #include <dom/DOM_NodeList.hpp>
00124 #include <dom/DOM_Notation.hpp>
00125 #include <dom/DOM_Text.hpp>
00126 #include <dom/DOM_Node.hpp>
00127 #include <dom/DOM_NodeIterator.hpp>
00128 #include <dom/DOM_TreeWalker.hpp>
00129 #include <dom/DOM_XMLDecl.hpp>
00130
00131 class DocumentImpl;
00132 class NodeIteratorImpl;
00133
00134
00147 class DOM_Document: public DOM_Node {
00148
00149 public:
00151
00161 DOM_Document();
00162
00169 DOM_Document(const DOM_Document &other);
00175 DOM_Document & operator = (const DOM_Document &other);
00176
00190 DOM_Document & operator = (const DOM_NullPtr *val);
00191
00192
00193
00194
00196
00197
00210 ~DOM_Document();
00211
00212
00214
00215
00228 static DOM_Document createDocument();
00229
00237 DOM_Entity createEntity(const DOMString &name);
00238
00251 DOM_Element createElement(const DOMString &tagName);
00252
00270 DOM_Element createElement(const XMLCh *tagName);
00271
00272
00279 DOM_DocumentFragment createDocumentFragment();
00280
00288 DOM_Text createTextNode(const DOMString &data);
00289
00297 DOM_Comment createComment(const DOMString &data);
00298
00308 DOM_CDATASection createCDATASection(const DOMString &data);
00309
00317 DOM_DocumentType createDocumentType(const DOMString &name);
00318
00319
00329 DOM_Notation createNotation(const DOMString &name);
00330
00331
00343 DOM_ProcessingInstruction createProcessingInstruction(const DOMString &target,
00344 const DOMString &data);
00345
00346
00363 DOM_Attr createAttribute(const DOMString &name);
00364
00365
00376 DOM_EntityReference createEntityReference(const DOMString &name);
00377
00378
00403
00404 DOM_NodeIterator createNodeIterator(DOM_Node root,
00405 unsigned long whatToShow,
00406 DOM_NodeFilter* filter,
00407 bool entityReferenceExpansion);
00438
00439 DOM_TreeWalker createTreeWalker(DOM_Node root,
00440 unsigned long whatToShow,
00441 DOM_NodeFilter* filter,
00442 bool entityReferenceExpansion);
00443
00458
00459 DOM_XMLDecl createXMLDecl(const DOMString& version,
00460 const DOMString& encoding,
00461 const DOMString& standalone);
00462
00463
00465
00475 DOM_DocumentType getDoctype() const;
00476
00477
00478
00482 DOM_DOMImplementation &getImplementation() const;
00483
00484
00488 DOM_Element getDocumentElement() const;
00489
00504 DOM_NodeList getElementsByTagName(const DOMString &tagname) const;
00505
00506
00508
00509
00532 DOM_Node importNode(const DOM_Node &importedNode, bool deep);
00533
00556 DOM_Element createElementNS(const DOMString &namespaceURI,
00557 const DOMString &qualifiedName);
00558
00587 DOM_Attr createAttributeNS(const DOMString &namespaceURI,
00588 const DOMString &qualifiedName);
00589
00606 DOM_NodeList getElementsByTagNameNS(const DOMString &namespaceURI,
00607 const DOMString &localName) const;
00608
00624 DOM_Element getElementById(const DOMString &elementId);
00625
00626
00627
00629
00630
00640 void putIdentifier(const DOMString &elementId, const DOM_Element &ele);
00641
00642
00643 protected:
00644 DOM_Document (DocumentImpl *impl);
00645
00646 friend class DOM_Node;
00647 friend class NodeIteratorImpl;
00648 friend class DOM_DOMImplementation;
00649
00650 };
00651
00652
00653 #endif