DOMDocument.hpp
Go to the documentation of this file.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: DOMDocument.hpp 932889 2010-04-11 13:10:10Z borisk $
*/
#if !defined(XERCESC_INCLUDE_GUARD_DOMDOCUMENT_HPP)
#define XERCESC_INCLUDE_GUARD_DOMDOCUMENT_HPP
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNode.hpp>
#include <xercesc/dom/DOMDocumentRange.hpp>
#include <xercesc/dom/DOMDocumentTraversal.hpp>
#include <xercesc/dom/DOMXPathEvaluator.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class DOMConfiguration;
class DOMDocumentType;
class DOMElement;
class DOMDocumentFragment;
class DOMComment;
class DOMCDATASection;
class DOMProcessingInstruction;
class DOMAttr;
class DOMEntity;
class DOMEntityReference;
class DOMImplementation;
class DOMNodeFilter;
class DOMNodeList;
class DOMNotation;
class DOMText;
class DOMNode;
class CDOM_EXPORT DOMDocument: public DOMDocumentRange,
public DOMXPathEvaluator,
public DOMDocumentTraversal,
public DOMNode {
protected:
// -----------------------------------------------------------------------
// Hidden constructors
// -----------------------------------------------------------------------
DOMDocument() {};
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
DOMDocument(const DOMDocument &);
DOMDocument & operator = (const DOMDocument &);
public:
// -----------------------------------------------------------------------
// All constructors are hidden, just the destructor is available
// -----------------------------------------------------------------------
virtual ~DOMDocument() {};
// -----------------------------------------------------------------------
// Virtual DOMDocument interface
// -----------------------------------------------------------------------
virtual DOMElement *createElement(const XMLCh *tagName) = 0;
virtual DOMDocumentFragment *createDocumentFragment() = 0;
virtual DOMText *createTextNode(const XMLCh *data) = 0;
virtual DOMComment *createComment(const XMLCh *data) = 0;
virtual DOMCDATASection *createCDATASection(const XMLCh *data) = 0;
virtual DOMProcessingInstruction *createProcessingInstruction(const XMLCh *target,
const XMLCh *data) = 0;
virtual DOMAttr *createAttribute(const XMLCh *name) = 0;
virtual DOMEntityReference *createEntityReference(const XMLCh *name) = 0;
virtual DOMDocumentType *getDoctype() const = 0;
virtual DOMImplementation *getImplementation() const = 0;
virtual DOMElement *getDocumentElement() const = 0;
virtual DOMNodeList *getElementsByTagName(const XMLCh *tagname) const = 0;
virtual DOMNode *importNode(const DOMNode *importedNode, bool deep) = 0;
virtual DOMElement *createElementNS(const XMLCh *namespaceURI,
const XMLCh *qualifiedName) = 0;
virtual DOMAttr *createAttributeNS(const XMLCh *namespaceURI,
const XMLCh *qualifiedName) = 0;
virtual DOMNodeList *getElementsByTagNameNS(const XMLCh *namespaceURI,
const XMLCh *localName) const = 0;
virtual DOMElement * getElementById(const XMLCh *elementId) const = 0;
virtual const XMLCh* getInputEncoding() const = 0;
virtual const XMLCh* getXmlEncoding() const = 0;
virtual bool getXmlStandalone() const = 0;
virtual void setXmlStandalone(bool standalone) = 0;
virtual const XMLCh* getXmlVersion() const = 0;
virtual void setXmlVersion(const XMLCh* version) = 0;
virtual const XMLCh* getDocumentURI() const = 0;
virtual void setDocumentURI(const XMLCh* documentURI) = 0;
virtual bool getStrictErrorChecking() const = 0;
virtual void setStrictErrorChecking(bool strictErrorChecking) = 0;
virtual DOMNode* renameNode(DOMNode* n, const XMLCh* namespaceURI, const XMLCh* qualifiedName) = 0;
virtual DOMNode* adoptNode(DOMNode* source) = 0;
virtual void normalizeDocument() = 0;
virtual DOMConfiguration* getDOMConfig() const = 0;
// -----------------------------------------------------------------------
// Non-standard extension
// -----------------------------------------------------------------------
virtual DOMEntity *createEntity(const XMLCh *name) = 0;
virtual DOMDocumentType *createDocumentType(const XMLCh *name) = 0;
/***
* Provide default implementation to maintain source code compatibility
***/
virtual DOMDocumentType* createDocumentType(const XMLCh *qName,
const XMLCh*, //publicId,
const XMLCh* //systemId
)
{
return createDocumentType(qName);
}
virtual DOMNotation *createNotation(const XMLCh *name) = 0;
virtual DOMElement *createElementNS(const XMLCh *namespaceURI,
const XMLCh *qualifiedName,
const XMLFileLoc lineNum,
const XMLFileLoc columnNum) = 0;
};
XERCES_CPP_NAMESPACE_END
#endif
DOMConfiguration
The DOMConfiguration interface represents the configuration of a document and maintains a table of re...
Definition: DOMConfiguration.hpp:350
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
CDOM_EXPORT
#define CDOM_EXPORT
Definition: XercesDefs.hpp:166
XMLCh
char16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
DOMXPathEvaluator
The evaluation of XPath expressions is provided by DOMXPathEvaluator.
Definition: DOMXPathEvaluator.hpp:47
DOMDocumentType
Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType object.
Definition: DOMDocumentType.hpp:45
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
DOMProcessingInstruction
The DOMProcessingInstruction interface represents a "processing instruction", used in XML as a way to...
Definition: DOMProcessingInstruction.hpp:38
DOMEntity
This interface represents an entity, either parsed or unparsed, in an XML document.
Definition: DOMEntity.hpp:66
DOMDocumentTraversal
DOMDocumentTraversal contains methods that create DOMNodeIterators and DOMTreeWalkers to traverse a n...
Definition: DOMDocumentTraversal.hpp:47
DOMComment
This interface inherits from CharacterData and represents the content of a comment,...
Definition: DOMComment.hpp:39
DOMNode.hpp
DOMDocument::~DOMDocument
virtual ~DOMDocument()
Destructor.
Definition: DOMDocument.hpp:99
DOMDocument
The DOMDocument interface represents the entire XML document.
Definition: DOMDocument.hpp:64
DOMDocument::DOMDocument
DOMDocument()
Definition: DOMDocument.hpp:76
DOMDocument::createDocumentType
virtual DOMDocumentType * createDocumentType(const XMLCh *qName, const XMLCh *, const XMLCh *)
Definition: DOMDocument.hpp:782
XMLFileLoc
XMLUInt64 XMLFileLoc
Definition: Xerces_autoconf_config.hpp:144
DOMDocumentRange.hpp
DOMDocumentTraversal.hpp
DOMDocumentRange
Definition: DOMDocumentRange.hpp:37
DOMXPathEvaluator.hpp
DOMEntityReference
DOMEntityReference objects may be inserted into the structure model when an entity reference is in th...
Definition: DOMEntityReference.hpp:57
DOMDocumentFragment
DOMDocumentFragment is a "lightweight" or "minimal" DOMDocument object.
Definition: DOMDocumentFragment.hpp:71
DOMText
The DOMText interface inherits from DOMCharacterData and represents the textual content (termed chara...
Definition: DOMText.hpp:51
DOMNodeList
The DOMNodeList interface provides the abstraction of an ordered collection of nodes.
Definition: DOMNodeList.hpp:45
DOMAttr
The DOMAttr class refers to an attribute of an XML element.
Definition: DOMAttr.hpp:57
XercesDefs.hpp
DOMElement
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition: DOMElement.hpp:66
DOMNotation
This interface represents a notation declared in the DTD.
Definition: DOMNotation.hpp:44
DOMImplementation
The DOMImplementation interface provides a number of methods for performing operations that are indep...
Definition: DOMImplementation.hpp:43
DOMCDATASection
CDATA sections are used to escape blocks of text containing characters that would otherwise be regard...
Definition: DOMCDATASection.hpp:65
DOMNodeFilter
Filters are objects that know how to "filter out" nodes.
Definition: DOMNodeFilter.hpp:49
DOMNode
The DOMNode interface is the primary datatype for the entire Document Object Model.
Definition: DOMNode.hpp:139