C++ Language Binding for DOM Level 3

[Back to Readme]


This document contains the Apache Recommended C++ Language binding for the Document Object Model Level 3.0 Core, Document Object Model Level 2.0 Traversal and Range and for the Document Object Model Level 3.0 Load and Save, as well as the Document Object Model Level 3.0 XPath Note. 

The definitions are divided into Core, Traversal, Range, Load and Save and XPath. The headers are also available in Xerces-C++ distribution.

Note:

  1. Constructor and Destructors are implementation specific
  2. String is represented by "XMLCh*" which is a pointer to unsigned 16 bit type holding utf-16 values, null terminated.
  3. XMLSize_t is an implementation-dependent unsigned integral type
  4. DOMObject is represented as void*
  5. C++ Memory Management:
    1. A member method "release()" is added for releasing any "orphaned" resources that were created through createXXXX factory method.
    2. Memory for any returned object e.g.
      • DOMImplementation* getDOMImplementation(const XMLCh* features)
      • ... etc.
      • are owned by implementation

Change History

Date Description
Xerces-C++ 2.0: July 23, 2002 Created
Xerces-C++ 2.1: August 26, 2002 Modified
- add const modifier to DOMNode::lookupNamespacePrefix
- add const modifier to DOMNode::lookupNamespaceURI
- add const modifier to DOMNode::isDefaultNamespace
Xerces-C++ 2.2: February 7, 2003 Modified
- add DOMElement::getTypeInfo and DOMAttr::getTypeInfo and DOMTypeInfo.hpp
- add const modifier to DOMNode::compareTreePosition, and add DOMTreePosition
- add const modifier to DOMNode::isSameNode
- add const modifier to DOMNode::isEqualNode
- add const modifier to DOMImplementation::hasFeature
- fix typo: "Mode:" -> "Model"
- added DOMAttr::isID
- added DOMElement::setIdAttribute, DOMElement::setIdAttributeNS, DOMElement::setIdAttributeNode
Xerces-C++ 2.3 Modified
- added DOMError::getRelatedData, DOMError::setRelatedData, DOMError::SetType, DOMError::getType
- removed DOMDocument::setFeature, DOMDocument::getFeature, DOMDocument::canSetFeature
- added DOMDocument::getDOMConfiguration
Xerces-C++ 2.4 Modified
- added DOM Level 3 XPath interfaces
Xerces-C++ 3.0 Modified
- Updated to match the final DOM Level 3 Recommendation documents
Xerces-C++ 3.1 Modified
- added DOM ElementTraversal


A: Document Object Model: Core

DOMImplementationRegistry.hpp:

class DOMImplementationRegistry
{
public:
static DOMImplementation* getDOMImplementation(const XMLCh* features);
static DOMImplementationList* getDOMImplementationList(const XMLCh* features);
static void addSource(DOMImplementationSource* source);
};

DOMImplementationSource.hpp:

class DOMImplementationSource
{
public:
virtual DOMImplementation* getDOMImplementation(const XMLCh* features) const = 0;
virtual DOMImplementationList* getDOMImplementationList(const XMLCh* features) const = 0;
};

DOMImplementationList.hpp:

class DOMImplementationList
{
public:
virtual DOMImplementation *item(XMLSize_t index) const = 0;
virtual XMLSize_t getLength() const = 0;
virtual void release() = 0;
};

DOMImplementation.hpp:

class DOMImplementation : public DOMImplementationLS
{
public:
virtual bool hasFeature(const XMLCh *feature, const XMLCh *version) const = 0;
virtual DOMDocumentType *createDocumentType(const XMLCh *qualifiedName, const XMLCh *publicId, const XMLCh *systemId) = 0;
virtual DOMDocument *createDocument(const XMLCh *namespaceURI, const XMLCh *qualifiedName, DOMDocumentType *doctype, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
virtual void* getFeature(const XMLCh* feature, const XMLCh* version) const = 0;
virtual DOMDocument *createDocument(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
static DOMImplementation *getImplementation();
};

DOMConfiguration.hpp:

class DOMConfiguration
{
public:
virtual void setParameter(const XMLCh* name, const void* value) = 0;
virtual void setParameter(const XMLCh* name, bool value) = 0;
virtual const void* getParameter(const XMLCh* name) const = 0;
virtual bool canSetParameter(const XMLCh* name, const void* value) const = 0;
virtual bool canSetParameter(const XMLCh* name, bool value) const = 0;
virtual const DOMStringList* getParameterNames() const = 0;
};

DOMStringList.hpp:

class DOMStringList
{
public:
virtual const XMLCh *item(XMLSize_t index) const = 0;
virtual XMLSize_t getLength() const = 0;
virtual bool contains(const XMLCh*) const = 0;
virtual void release() = 0;
};

DOMNamedNodeMap.hpp:

class DOMNamedNodeMap
{
public:
virtual DOMNode *setNamedItem(DOMNode *arg) = 0;
virtual DOMNode *item(XMLSize_t index) const = 0;
virtual DOMNode *getNamedItem(const XMLCh *name) const = 0;
virtual XMLSize_t getLength() const = 0;
virtual DOMNode *removeNamedItem(const XMLCh *name) = 0;
virtual DOMNode *getNamedItemNS(const XMLCh *namespaceURI, const XMLCh *localName) const = 0;
virtual DOMNode *setNamedItemNS(DOMNode *arg) = 0;
virtual DOMNode *removeNamedItemNS(const XMLCh *namespaceURI, const XMLCh *localName) = 0;
};

DOMNodeList.hpp:

class DOMNodeList
{
public:
virtual DOMNode *item(XMLSize_t index) const = 0;
virtual XMLSize_t getLength() const = 0;
};

DOMError.hpp:

class DOMError
{
public:
virtual ErrorSeverity getSeverity() const = 0;
virtual const XMLCh* getMessage() const = 0;
virtual DOMLocator* getLocation() const = 0;
virtual void* getRelatedException() const = 0;
virtual const XMLCh* getType() const = 0;
virtual void* getRelatedData() const = 0;
};

DOMException.hpp:

class DOMException
{
public:
enum ExceptionCode {
INDEX_SIZE_ERR = 1,
DOMSTRING_SIZE_ERR = 2,
HIERARCHY_REQUEST_ERR = 3,
WRONG_DOCUMENT_ERR = 4,
INVALID_CHARACTER_ERR = 5,
NO_DATA_ALLOWED_ERR = 6,
NO_MODIFICATION_ALLOWED_ERR = 7,
NOT_FOUND_ERR = 8,
NOT_SUPPORTED_ERR = 9,
INUSE_ATTRIBUTE_ERR = 10,
INVALID_STATE_ERR = 11,
SYNTAX_ERR = 12,
INVALID_MODIFICATION_ERR = 13,
NAMESPACE_ERR = 14,
INVALID_ACCESS_ERR = 15,
VALIDATION_ERR = 16,
TYPE_MISMATCH_ERR = 17,
};
};

DOMLocator.hpp:

class DOMLocator
{
public:
virtual XMLFileLoc getLineNumber() const = 0;
virtual XMLFileLoc getColumnNumber() const = 0;
virtual XMLFilePos getByteOffset() const = 0;
virtual XMLFilePos getUtf16Offset() const = 0;
virtual DOMNode* getRelatedNode() const = 0;
virtual const XMLCh* getURI() const = 0;
};

DOMNode.hpp:

class DOMNode
{
public:
enum NodeType {
ELEMENT_NODE = 1,
ATTRIBUTE_NODE = 2,
TEXT_NODE = 3,
CDATA_SECTION_NODE = 4,
ENTITY_REFERENCE_NODE = 5,
ENTITY_NODE = 6,
PROCESSING_INSTRUCTION_NODE = 7,
COMMENT_NODE = 8,
DOCUMENT_NODE = 9,
DOCUMENT_TYPE_NODE = 10,
DOCUMENT_FRAGMENT_NODE = 11,
NOTATION_NODE = 12,
};
enum DocumentPosition {
DOCUMENT_POSITION_DISCONNECTED = 0x01,
DOCUMENT_POSITION_PRECEDING = 0x02,
DOCUMENT_POSITION_FOLLOWING = 0x04,
DOCUMENT_POSITION_CONTAINS = 0x08,
DOCUMENT_POSITION_CONTAINED_BY = 0x10,
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20,
};
virtual const XMLCh * getNodeName() const = 0;
virtual const XMLCh * getNodeValue() const = 0;
virtual NodeType getNodeType() const = 0;
virtual DOMNode *getParentNode() const = 0;
virtual DOMNodeList *getChildNodes() const = 0;
virtual DOMNode *getFirstChild() const = 0;
virtual DOMNode *getLastChild() const = 0;
virtual DOMNode *getPreviousSibling() const = 0;
virtual DOMNode *getNextSibling() const = 0;
virtual DOMNamedNodeMap *getAttributes() const = 0;
virtual DOMDocument *getOwnerDocument() const = 0;
virtual DOMNode * cloneNode(bool deep) const = 0;
virtual DOMNode *insertBefore(DOMNode *newChild, DOMNode *refChild) = 0;
virtual DOMNode *replaceChild(DOMNode *newChild, DOMNode *oldChild) = 0;
virtual DOMNode *removeChild(DOMNode *oldChild) = 0;
virtual DOMNode *appendChild(DOMNode *newChild) = 0;
virtual bool hasChildNodes() const = 0;
virtual void setNodeValue(const XMLCh *nodeValue) = 0;
virtual void normalize() = 0;
virtual bool isSupported(const XMLCh *feature, const XMLCh *version) const = 0;
virtual const XMLCh * getNamespaceURI() const = 0;
virtual const XMLCh * getPrefix() const = 0;
virtual const XMLCh * getLocalName() const = 0;
virtual void setPrefix(const XMLCh * prefix) = 0;
virtual bool hasAttributes() const = 0;
virtual bool isSameNode(const DOMNode* other) const = 0;
virtual bool isEqualNode(const DOMNode* arg) const = 0;
virtual void* setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) = 0;
virtual void* getUserData(const XMLCh* key) const = 0;
virtual const XMLCh* getBaseURI() const = 0;
virtual short compareDocumentPosition(const DOMNode* other) const = 0;
virtual const XMLCh* getTextContent() const = 0;
virtual void setTextContent(const XMLCh* textContent) = 0;
virtual const XMLCh* lookupPrefix(const XMLCh* namespaceURI) const = 0;
virtual bool isDefaultNamespace(const XMLCh* namespaceURI) const = 0;
virtual const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const = 0;
virtual void* getFeature(const XMLCh* feature, const XMLCh* version) const = 0;
virtual void release() = 0;
virtual void decRefCount() {}
virtual void incRefCount() {}
};

DOMAttr.hpp:

class DOMAttr : public DOMNode
{
public:
virtual const XMLCh * getName() const = 0;
virtual bool getSpecified() const = 0;
virtual const XMLCh * getValue() const = 0;
virtual void setValue(const XMLCh *value) = 0;
virtual DOMElement *getOwnerElement() const = 0;
virtual bool isId() const = 0;
virtual const DOMTypeInfo * getSchemaTypeInfo() const = 0;
};

DOMCDATASection.hpp:

class DOMCDATASection : public DOMText
{
public:
};

DOMCharacterData.hpp:

class DOMCharacterData : public DOMNode
{
public:
virtual const XMLCh * getData() const = 0;
virtual XMLSize_t getLength() const = 0;
virtual const XMLCh * substringData(XMLSize_t offset, XMLSize_t count) const = 0;
virtual void appendData(const XMLCh *arg) = 0;
virtual void insertData(XMLSize_t offset, const XMLCh *arg) = 0;
virtual void deleteData(XMLSize_t offset, XMLSize_t count) = 0;
virtual void replaceData(XMLSize_t offset, XMLSize_t count, const XMLCh *arg) = 0;
virtual void setData(const XMLCh *data) = 0;
};

DOMComment.hpp:

class DOMComment : public DOMCharacterData
{
public:
};

DOMDocument.hpp:

class DOMDocument : public DOMNode
{
public:
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;
virtual DOMEntity *createEntity(const XMLCh *name) = 0;
virtual DOMDocumentType *createDocumentType(const XMLCh *name) = 0;
virtual DOMDocumentType* createDocumentType(const XMLCh *qName, const XMLCh*, //publicId, const XMLCh* //systemId )
virtual DOMNotation *createNotation(const XMLCh *name) = 0;
virtual DOMElement *createElementNS(const XMLCh *namespaceURI, const XMLCh *qualifiedName, const XMLFileLoc lineNum, const XMLFileLoc columnNum) = 0;
};

DOMDocumentFragment.hpp:

class DOMDocumentFragment : public DOMNode
{
public:
};

DOMDocumentType.hpp:

class DOMDocumentType : public DOMNode
{
public:
virtual const XMLCh * getName() const = 0;
virtual DOMNamedNodeMap *getEntities() const = 0;
virtual DOMNamedNodeMap *getNotations() const = 0;
virtual const XMLCh * getPublicId() const = 0;
virtual const XMLCh * getSystemId() const = 0;
virtual const XMLCh * getInternalSubset() const = 0;
};

DOMElement.hpp:

class DOMElement : public DOMNode
{
public:
virtual const XMLCh * getTagName() const = 0;
virtual const XMLCh * getAttribute(const XMLCh *name) const = 0;
virtual DOMAttr * getAttributeNode(const XMLCh *name) const = 0;
virtual DOMNodeList * getElementsByTagName(const XMLCh *name) const = 0;
virtual void setAttribute(const XMLCh *name, const XMLCh *value) = 0;
virtual DOMAttr * setAttributeNode(DOMAttr *newAttr) = 0;
virtual DOMAttr * removeAttributeNode(DOMAttr *oldAttr) = 0;
virtual void removeAttribute(const XMLCh *name) = 0;
virtual const XMLCh * getAttributeNS(const XMLCh *namespaceURI, const XMLCh *localName) const = 0;
virtual void setAttributeNS(const XMLCh *namespaceURI, const XMLCh *qualifiedName, const XMLCh *value) = 0;
virtual void removeAttributeNS(const XMLCh *namespaceURI, const XMLCh *localName) = 0;
virtual DOMAttr * getAttributeNodeNS(const XMLCh *namespaceURI, const XMLCh *localName) const = 0;
virtual DOMAttr * setAttributeNodeNS(DOMAttr *newAttr) = 0;
virtual DOMNodeList * getElementsByTagNameNS(const XMLCh *namespaceURI, const XMLCh *localName) const = 0;
virtual bool hasAttribute(const XMLCh *name) const = 0;
virtual bool hasAttributeNS(const XMLCh *namespaceURI, const XMLCh *localName) const = 0;
virtual void setIdAttribute(const XMLCh* name, bool isId) = 0;
virtual void setIdAttributeNS(const XMLCh* namespaceURI, const XMLCh* localName, bool isId) = 0;
virtual void setIdAttributeNode(const DOMAttr *idAttr, bool isId) = 0;
virtual const DOMTypeInfo* getSchemaTypeInfo() const = 0;
virtual DOMElement * getFirstElementChild() const = 0;
virtual DOMElement * getLastElementChild() const = 0;
virtual DOMElement * getPreviousElementSibling() const = 0;
virtual DOMElement * getNextElementSibling() const = 0;
virtual XMLSize_t getChildElementCount() const = 0;
};

DOMEntity.hpp:

class DOMEntity : public DOMNode
{
public:
virtual const XMLCh * getPublicId() const = 0;
virtual const XMLCh * getSystemId() const = 0;
virtual const XMLCh * getNotationName() const = 0;
virtual const XMLCh* getInputEncoding() const = 0;
virtual const XMLCh* getXmlEncoding() const = 0;
virtual const XMLCh* getXmlVersion() const = 0;
};

DOMEntityReference.hpp:

class DOMEntityReference : public DOMNode
{
public:
};

DOMNotation.hpp:

class DOMNotation : public DOMNode
{
public:
virtual const XMLCh *getPublicId() const = 0;
virtual const XMLCh *getSystemId() const = 0;
};

DOMProcessingInstruction.hpp:

class DOMProcessingInstruction : public DOMNode
{
public:
virtual const XMLCh * getTarget() const = 0;
virtual const XMLCh * getData() const = 0;
virtual void setData(const XMLCh * data) = 0;
};

DOMText.hpp:

class DOMText : public DOMCharacterData
{
public:
virtual DOMText *splitText(XMLSize_t offset) = 0;
virtual bool getIsElementContentWhitespace() const = 0;
virtual const XMLCh* getWholeText() const = 0;
virtual DOMText* replaceWholeText(const XMLCh* content) = 0;
virtual bool isIgnorableWhitespace() const = 0;
};

DOMTypeInfo.hpp:

class DOMTypeInfo
{
public:
enum DerivationMethods {
DERIVATION_RESTRICTION = 0x001,
DERIVATION_EXTENSION = 0x002,
DERIVATION_UNION = 0x004,
DERIVATION_LIST = 0x008,
};
virtual const XMLCh* getTypeName() const = 0;
virtual const XMLCh* getTypeNamespace() const = 0;
virtual bool isDerivedFrom(const XMLCh* typeNamespaceArg, const XMLCh* typeNameArg, DerivationMethods derivationMethod) const = 0;
};

DOMErrorHandler.hpp:

class DOMErrorHandler
{
public:
virtual bool handleError(const DOMError& domError) = 0;
};

DOMUserDataHandler.hpp:

class DOMUserDataHandler
{
public:
enum DOMOperationType {
NODE_CLONED = 1,
NODE_IMPORTED = 2,
NODE_DELETED = 3,
NODE_RENAMED = 4,
NODE_ADOPTED = 5,
};
virtual void handle(DOMOperationType operation, const XMLCh* const key, void* data, const DOMNode* src, DOMNode* dst) = 0;
};

B: Document Object Model: Traversal

DOMNodeIterator.hpp:

class DOMNodeIterator
{
public:
virtual DOMNode* getRoot() = 0;
virtual DOMNodeFilter::ShowType getWhatToShow() = 0;
virtual DOMNodeFilter* getFilter() = 0;
virtual bool getExpandEntityReferences() = 0;
virtual DOMNode* nextNode() = 0;
virtual DOMNode* previousNode() = 0;
virtual void detach() = 0;
virtual void release() = 0;
};

DOMNodeFilter.hpp:

class DOMNodeFilter
{
public:
enum FilterAction {
FILTER_REJECT = 2,
FILTER_SKIP = 3};,
};
enum ShowTypeMasks {
SHOW_ALL = 0x0000FFFF,
SHOW_ELEMENT = 0x00000001,
SHOW_ATTRIBUTE = 0x00000002,
SHOW_TEXT = 0x00000004,
SHOW_CDATA_SECTION = 0x00000008,
SHOW_ENTITY_REFERENCE = 0x00000010,
SHOW_ENTITY = 0x00000020,
SHOW_PROCESSING_INSTRUCTION = 0x00000040,
SHOW_COMMENT = 0x00000080,
SHOW_DOCUMENT = 0x00000100,
SHOW_DOCUMENT_TYPE = 0x00000200,
SHOW_DOCUMENT_FRAGMENT = 0x00000400,
SHOW_NOTATION = 0x00000800,
};
};

DOMTreeWalker.hpp:

class DOMTreeWalker
{
public:
virtual DOMNode* getRoot() = 0;
virtual DOMNodeFilter::ShowType getWhatToShow()= 0;
virtual DOMNodeFilter* getFilter()= 0;
virtual bool getExpandEntityReferences()= 0;
virtual DOMNode* getCurrentNode()= 0;
virtual DOMNode* parentNode()= 0;
virtual DOMNode* firstChild()= 0;
virtual DOMNode* lastChild()= 0;
virtual DOMNode* previousSibling()= 0;
virtual DOMNode* nextSibling()= 0;
virtual DOMNode* previousNode()= 0;
virtual DOMNode* nextNode()= 0;
virtual void setCurrentNode(DOMNode* currentNode)= 0;
virtual void release() = 0;
};

DOMDocumentTraversal.hpp:

class DOMDocumentTraversal
{
public:
virtual DOMNodeIterator *createNodeIterator(DOMNode* root, DOMNodeFilter::ShowType whatToShow, DOMNodeFilter* filter, bool entityReferenceExpansion) = 0;
virtual DOMTreeWalker *createTreeWalker(DOMNode* root, DOMNodeFilter::ShowType whatToShow, DOMNodeFilter* filter, bool entityReferenceExpansion) = 0;
};

C: Document Object Model: Range

DOMRangeException.hpp:

class DOMRangeException : public DOMException
{
public:
enum RangeExceptionCode {
BAD_BOUNDARYPOINTS_ERR = 111,
INVALID_NODE_TYPE_ERR = 112,
};
};

DOMRange.hpp:

class DOMRange
{
public:
enum CompareHow {
START_TO_START = 0,
START_TO_END = 1,
END_TO_END = 2,
END_TO_START = 3,
};
virtual DOMNode* getStartContainer() const = 0;
virtual XMLSize_t getStartOffset() const = 0;
virtual DOMNode* getEndContainer() const = 0;
virtual XMLSize_t getEndOffset() const = 0;
virtual bool getCollapsed() const = 0;
virtual const DOMNode* getCommonAncestorContainer() const = 0;
virtual void setStart(const DOMNode *refNode, XMLSize_t offset) = 0;
virtual void setEnd(const DOMNode *refNode, XMLSize_t offset) = 0;
virtual void setStartBefore(const DOMNode *refNode) = 0;
virtual void setStartAfter(const DOMNode *refNode) = 0;
virtual void setEndBefore(const DOMNode *refNode) = 0;
virtual void setEndAfter(const DOMNode *refNode) = 0;
virtual void collapse(bool toStart) = 0;
virtual void selectNode(const DOMNode *refNode) = 0;
virtual void selectNodeContents(const DOMNode *refNode) = 0;
virtual short compareBoundaryPoints(CompareHow how, const DOMRange* sourceRange) const = 0;
virtual void deleteContents() = 0;
virtual DOMDocumentFragment* extractContents() = 0;
virtual DOMDocumentFragment* cloneContents() const = 0;
virtual void insertNode(DOMNode *newNode) = 0;
virtual void surroundContents(DOMNode *newParent) = 0;
virtual DOMRange* cloneRange() const = 0;
virtual const XMLCh* toString() const = 0;
virtual void detach() = 0;
virtual void release() = 0;
};

DOMDocumentRange.hpp:

class DOMDocumentRange
{
public:
virtual DOMRange *createRange() = 0;
};

D: Document Object Model: Load and Save

DOMLSException.hpp:

class DOMLSException : public DOMException
{
public:
enum LSExceptionCode {
PARSE_ERR = 81,
SERIALIZE_ERR = 82,
};
};

DOMImplementationLS.hpp:

class DOMImplementationLS
{
public:
virtual DOMLSParser* createLSParser(const DOMImplementationLSMode mode, const XMLCh* const schemaType, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager, XMLGrammarPool* const gramPool = 0) = 0;
virtual DOMLSSerializer* createLSSerializer(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
virtual DOMLSInput* createLSInput(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
virtual DOMLSOutput* createLSOutput(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager) = 0;
};

DOMLSInput.hpp:

class DOMLSInput
{
public:
virtual const XMLCh* getStringData() const = 0;
virtual InputSource* getByteStream() const = 0;
virtual const XMLCh* getEncoding() const = 0;
virtual const XMLCh* getPublicId() const = 0;
virtual const XMLCh* getSystemId() const = 0;
virtual const XMLCh* getBaseURI() const = 0;
virtual void setStringData(const XMLCh* data) = 0;
virtual void setByteStream(InputSource* stream) = 0;
virtual void setEncoding(const XMLCh* const encodingStr) = 0;
virtual void setPublicId(const XMLCh* const publicId) = 0;
virtual void setSystemId(const XMLCh* const systemId) = 0;
virtual void setBaseURI(const XMLCh* const baseURI) = 0;
virtual void setIssueFatalErrorIfNotFound(bool flag) = 0;
virtual bool getIssueFatalErrorIfNotFound() const = 0;
virtual void release() = 0;
};

DOMLSOutput.hpp:

class DOMLSOutput
{
public:
virtual XMLFormatTarget* getByteStream() const = 0;
virtual const XMLCh* getEncoding() const = 0;
virtual const XMLCh* getSystemId() const = 0;
virtual void setByteStream(XMLFormatTarget* stream) = 0;
virtual void setEncoding(const XMLCh* const encodingStr) = 0;
virtual void setSystemId(const XMLCh* const systemId) = 0;
virtual void release() = 0;
};

DOMLSParser.hpp:

class DOMLSParser
{
public:
virtual DOMConfiguration* getDomConfig() = 0;
virtual const DOMLSParserFilter* getFilter() const = 0;
virtual bool getAsync() const = 0;
virtual bool getBusy() const = 0;
virtual void setFilter(DOMLSParserFilter* const filter) = 0;
virtual DOMDocument* parse(const DOMLSInput* source) = 0;
virtual DOMDocument* parseURI(const XMLCh* const uri) = 0;
virtual DOMDocument* parseURI(const char* const uri) = 0;
virtual DOMNode* parseWithContext(const DOMLSInput* source, DOMNode* contextNode, const ActionType action) = 0;
virtual void abort() = 0;
virtual void release() = 0;
virtual void resetDocumentPool() = 0;
virtual Grammar* loadGrammar(const DOMLSInput* source, const Grammar::GrammarType grammarType, const bool toCache = false) = 0;
virtual Grammar* loadGrammar(const XMLCh* const systemId, const Grammar::GrammarType grammarType, const bool toCache = false) = 0;
virtual Grammar* loadGrammar(const char* const systemId, const Grammar::GrammarType grammarType, const bool toCache = false) = 0;
virtual Grammar* getGrammar(const XMLCh* const nameSpaceKey) const = 0;
virtual Grammar* getRootGrammar() const = 0;
virtual const XMLCh* getURIText(unsigned int uriId) const = 0;
virtual void resetCachedGrammarPool() = 0;
virtual XMLFilePos getSrcOffset() const = 0;
};

DOMLSParserFilter.hpp:

class DOMLSParserFilter
{
public:
enum FilterAction {
FILTER_REJECT = 2,
FILTER_SKIP = 3,
FILTER_INTERRUPT = 4};,
};
virtual FilterAction acceptNode(DOMNode* node) = 0;
virtual FilterAction startElement(DOMElement* node) = 0;
virtual DOMNodeFilter::ShowType getWhatToShow() const = 0;
};

DOMLSResourceResolver.hpp:

class DOMLSResourceResolver
{
public:
virtual DOMLSInput* resolveResource( const XMLCh* const resourceType , const XMLCh* const namespaceUri , const XMLCh* const publicId , const XMLCh* const systemId , const XMLCh* const baseURI) = 0;
};

DOMLSSerializer.hpp:

class DOMLSSerializer
{
public:
virtual DOMConfiguration* getDomConfig() = 0;
virtual void setNewLine(const XMLCh* const newLine) = 0;
virtual void setFilter(DOMLSSerializerFilter *filter) = 0;
virtual const XMLCh* getNewLine() const = 0;
virtual DOMLSSerializerFilter* getFilter() const = 0;
virtual bool write(const DOMNode* nodeToWrite, DOMLSOutput* const destination) = 0;
virtual bool writeToURI(const DOMNode* nodeToWrite, const XMLCh* uri) = 0;
virtual XMLCh* writeToString(const DOMNode* nodeToWrite, MemoryManager* manager = NULL) = 0;
virtual void release() = 0;
};

DOMLSSerializerFilter.hpp:

class DOMLSSerializerFilter : public DOMNodeFilter
{
public:
virtual FilterAction acceptNode(const DOMNode* node) const = 0;
virtual ShowType getWhatToShow() const =0;
};

E: Document Object Model: XPath

DOMXPathEvaluator.hpp:

class DOMXPathEvaluator
{
public:
virtual DOMXPathExpression* createExpression(const XMLCh *expression, const DOMXPathNSResolver *resolver) = 0;
virtual DOMXPathNSResolver* createNSResolver(const DOMNode *nodeResolver) = 0;
virtual DOMXPathResult* evaluate(const XMLCh *expression, const DOMNode *contextNode, const DOMXPathNSResolver *resolver, DOMXPathResult::ResultType type, DOMXPathResult* result) = 0;
};

DOMXPathException.hpp:

class DOMXPathException : public DOMException
{
public:
enum ExceptionCode {
INVALID_EXPRESSION_ERR = 51,
TYPE_ERR = 52,
NO_RESULT_ERROR = 53,
};
};

DOMXPathExpression.hpp:

class DOMXPathExpression
{
public:
virtual DOMXPathResult* evaluate(const DOMNode *contextNode, DOMXPathResult::ResultType type, DOMXPathResult* result) const = 0;
virtual void release() = 0;
};

DOMXPathNamespace.hpp:

class DOMXPathNamespace : public DOMNode
{
public:
enum XPathNodeType {
XPATH_NAMESPACE_NODE = 13,
};
virtual DOMElement *getOwnerElement() const = 0;
};

DOMXPathNSResolver.hpp:

class DOMXPathNSResolver
{
public:
virtual const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const = 0;
virtual const XMLCh* lookupPrefix(const XMLCh* URI) const = 0;
virtual void addNamespaceBinding(const XMLCh* prefix, const XMLCh* uri) = 0;
virtual void release() = 0;
};

DOMXPathResult.hpp:

class DOMXPathResult
{
public:
enum ResultType {
ANY_TYPE = 0,
NUMBER_TYPE = 1,
STRING_TYPE = 2,
BOOLEAN_TYPE = 3,
UNORDERED_NODE_ITERATOR_TYPE = 4,
ORDERED_NODE_ITERATOR_TYPE = 5,
UNORDERED_NODE_SNAPSHOT_TYPE = 6,
ORDERED_NODE_SNAPSHOT_TYPE = 7,
ANY_UNORDERED_NODE_TYPE = 8,
FIRST_ORDERED_NODE_TYPE = 9,
FIRST_RESULT_TYPE = 100,
ITERATOR_RESULT_TYPE = 101,
SNAPSHOT_RESULT_TYPE = 102,
};
virtual ResultType getResultType() const = 0;
virtual const DOMTypeInfo *getTypeInfo() const = 0;
virtual bool isNode() const = 0;
virtual bool getBooleanValue() const = 0;
virtual int getIntegerValue() const = 0;
virtual double getNumberValue() const = 0;
virtual const XMLCh* getStringValue() const = 0;
virtual DOMNode* getNodeValue() const = 0;
virtual bool iterateNext() = 0;
virtual bool getInvalidIteratorState() const = 0;
virtual bool snapshotItem(XMLSize_t index) = 0;
virtual XMLSize_t getSnapshotLength() const = 0;
virtual void release() = 0;
};

Copyright © 1999-2009 The Apache Software Foundation. All Rights Reserved.