Xerces-C++: DOMDocument.hpp Source File

Xerces-C++ 3.2.2

DOMDocument.hpp
Go to the documentation of this file.
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 /*
19 * $Id: DOMDocument.hpp 932889 2010-04-11 13:10:10Z borisk $
20 */
21
22 #if !defined(XERCESC_INCLUDE_GUARD_DOMDOCUMENT_HPP)
23 #define XERCESC_INCLUDE_GUARD_DOMDOCUMENT_HPP
24
25 #include <xercesc/util/XercesDefs.hpp>
26 #include <xercesc/dom/DOMNode.hpp>
27 #include <xercesc/dom/DOMDocumentRange.hpp>
28 #include <xercesc/dom/DOMDocumentTraversal.hpp>
29 #include <xercesc/dom/DOMXPathEvaluator.hpp>
30
31 XERCES_CPP_NAMESPACE_BEGIN
32
33 class DOMConfiguration;
34 class DOMDocumentType;
35 class DOMElement;
36 class DOMDocumentFragment;
37 class DOMComment;
38 class DOMCDATASection;
39 class DOMProcessingInstruction;
40 class DOMAttr;
41 class DOMEntity;
42 class DOMEntityReference;
43 class DOMImplementation;
44 class DOMNodeFilter;
45 class DOMNodeList;
46 class DOMNotation;
47 class DOMText;
48 class DOMNode;
49
50
64 class CDOM_EXPORT DOMDocument: public DOMDocumentRange,
65 public DOMXPathEvaluator,
66 public DOMDocumentTraversal,
67 public DOMNode {
68
69
70 protected:
71 // -----------------------------------------------------------------------
72 // Hidden constructors
73 // -----------------------------------------------------------------------
76 DOMDocument() {};
78
79 private:
80 // -----------------------------------------------------------------------
81 // Unimplemented constructors and operators
82 // -----------------------------------------------------------------------
85 DOMDocument(const DOMDocument &);
86 DOMDocument & operator = (const DOMDocument &);
88
89 public:
90 // -----------------------------------------------------------------------
91 // All constructors are hidden, just the destructor is available
92 // -----------------------------------------------------------------------
99 virtual ~DOMDocument() {};
101
102 // -----------------------------------------------------------------------
103 // Virtual DOMDocument interface
104 // -----------------------------------------------------------------------
127 virtual DOMElement *createElement(const XMLCh *tagName) = 0;
128
134 virtual DOMDocumentFragment *createDocumentFragment() = 0;
135
142 virtual DOMText *createTextNode(const XMLCh *data) = 0;
143
150 virtual DOMComment *createComment(const XMLCh *data) = 0;
151
159 virtual DOMCDATASection *createCDATASection(const XMLCh *data) = 0;
160
172 virtual DOMProcessingInstruction *createProcessingInstruction(const XMLCh *target,
173 const XMLCh *data) = 0;
174
175
192 virtual DOMAttr *createAttribute(const XMLCh *name) = 0;
193
194
212 virtual DOMEntityReference *createEntityReference(const XMLCh *name) = 0;
213
225 virtual DOMDocumentType *getDoctype() const = 0;
226
232 virtual DOMImplementation *getImplementation() const = 0;
233
239 virtual DOMElement *getDocumentElement() const = 0;
240
255 virtual DOMNodeList *getElementsByTagName(const XMLCh *tagname) const = 0;
256
258
261
360 virtual DOMNode *importNode(const DOMNode *importedNode, bool deep) = 0;
361
417 virtual DOMElement *createElementNS(const XMLCh *namespaceURI,
418 const XMLCh *qualifiedName) = 0;
419
482 virtual DOMAttr *createAttributeNS(const XMLCh *namespaceURI,
483 const XMLCh *qualifiedName) = 0;
484
497 virtual DOMNodeList *getElementsByTagNameNS(const XMLCh *namespaceURI,
498 const XMLCh *localName) const = 0;
499
513 virtual DOMElement * getElementById(const XMLCh *elementId) const = 0;
515
518
525 virtual const XMLCh* getInputEncoding() const = 0;
526
534 virtual const XMLCh* getXmlEncoding() const = 0;
535
542 virtual bool getXmlStandalone() const = 0;
543
551 virtual void setXmlStandalone(bool standalone) = 0;
552
560 virtual const XMLCh* getXmlVersion() const = 0;
561
569 virtual void setXmlVersion(const XMLCh* version) = 0;
570
579 virtual const XMLCh* getDocumentURI() const = 0;
588 virtual void setDocumentURI(const XMLCh* documentURI) = 0;
589
600 virtual bool getStrictErrorChecking() const = 0;
611 virtual void setStrictErrorChecking(bool strictErrorChecking) = 0;
612
657 virtual DOMNode* renameNode(DOMNode* n, const XMLCh* namespaceURI, const XMLCh* qualifiedName) = 0;
658
659
719 virtual DOMNode* adoptNode(DOMNode* source) = 0;
720
741 virtual void normalizeDocument() = 0;
742
743
751 virtual DOMConfiguration* getDOMConfig() const = 0;
752
754
755 // -----------------------------------------------------------------------
756 // Non-standard extension
757 // -----------------------------------------------------------------------
767 virtual DOMEntity *createEntity(const XMLCh *name) = 0;
768
777 virtual DOMDocumentType *createDocumentType(const XMLCh *name) = 0;
778
779 /***
780 * Provide default implementation to maintain source code compatibility
781 ***/
782 virtual DOMDocumentType* createDocumentType(const XMLCh *qName,
783 const XMLCh*, //publicId,
784 const XMLCh* //systemId
785 )
786 {
787 return createDocumentType(qName);
788 }
789
798 virtual DOMNotation *createNotation(const XMLCh *name) = 0;
799
809 virtual DOMElement *createElementNS(const XMLCh *namespaceURI,
810 const XMLCh *qualifiedName,
811 const XMLFileLoc lineNum,
812 const XMLFileLoc columnNum) = 0;
814
815 };
816
817 XERCES_CPP_NAMESPACE_END
818
819 #endif
DOMConfiguration
The DOMConfiguration interface represents the configuration of a document and maintains a table of re...
Definition: DOMConfiguration.hpp:350
DOMDocumentTraversal
DOMDocumentTraversal contains methods that create DOMNodeIterators and DOMTreeWalkers to traverse a n...
Definition: DOMDocumentTraversal.hpp:47
DOMDocumentType
Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType object...
Definition: DOMDocumentType.hpp:45
DOMAttr
The DOMAttr class refers to an attribute of an XML element.
Definition: DOMAttr.hpp:57
DOMNodeList
The DOMNodeList interface provides the abstraction of an ordered collection of nodes.
Definition: DOMNodeList.hpp:45
DOMXPathEvaluator
The evaluation of XPath expressions is provided by DOMXPathEvaluator.
Definition: DOMXPathEvaluator.hpp:47
DOMNodeFilter
Filters are objects that know how to "filter out" nodes.
Definition: DOMNodeFilter.hpp:49
XMLFileLoc
XMLUInt64 XMLFileLoc
Definition: Xerces_autoconf_config.hpp:144
DOMDocument::DOMDocument
DOMDocument()
Definition: DOMDocument.hpp:76
DOMEntity
This interface represents an entity, either parsed or unparsed, in an XML document.
Definition: DOMEntity.hpp:66
DOMDocumentFragment
DOMDocumentFragment is a "lightweight" or "minimal" DOMDocument object.
Definition: DOMDocumentFragment.hpp:71
XercesDefs.hpp
DOMXPathEvaluator.hpp
DOMEntityReference
DOMEntityReference objects may be inserted into the structure model when an entity reference is in th...
Definition: DOMEntityReference.hpp:57
DOMDocument::~DOMDocument
virtual ~DOMDocument()
Destructor.
Definition: DOMDocument.hpp:99
DOMDocument
The DOMDocument interface represents the entire XML document.
Definition: DOMDocument.hpp:64
DOMDocument::createDocumentType
virtual DOMDocumentType * createDocumentType(const XMLCh *qName, const XMLCh *, const XMLCh *)
Definition: DOMDocument.hpp:782
DOMElement
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition: DOMElement.hpp:66
DOMDocumentRange
Definition: DOMDocumentRange.hpp:37
DOMNotation
This interface represents a notation declared in the DTD.
Definition: DOMNotation.hpp:44
DOMText
The DOMText interface inherits from DOMCharacterData and represents the textual content (termed chara...
Definition: DOMText.hpp:51
DOMImplementation
The DOMImplementation interface provides a number of methods for performing operations that are indep...
Definition: DOMImplementation.hpp:43
CDOM_EXPORT
#define CDOM_EXPORT
Definition: XercesDefs.hpp:166
XMLCh
uint16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
DOMProcessingInstruction
The DOMProcessingInstruction interface represents a "processing instruction", used in XML as a way to...
Definition: DOMProcessingInstruction.hpp:38
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
DOMNode
The DOMNode interface is the primary datatype for the entire Document Object Model.
Definition: DOMNode.hpp:139
DOMCDATASection
CDATA sections are used to escape blocks of text containing characters that would otherwise be regard...
Definition: DOMCDATASection.hpp:65
DOMDocumentRange.hpp
DOMDocumentTraversal.hpp
DOMNode.hpp
DOMComment
This interface inherits from CharacterData and represents the content of a comment, i.e., all the characters between the starting &#39; <!–&#39; and ending &#39;–>&#39;.
Definition: DOMComment.hpp:39