DOMDocument
interface represents the entire XML document.
More...
#include <DOMDocument.hpp>
Inheritance diagram for xercesc::DOMDocument:
Public Member Functions | |
Destructor | |
virtual | ~DOMDocument () |
Destructor. | |
Functions introduced in DOM Level 1 | |
virtual DOMElement * | createElement (const XMLCh *tagName)=0 |
Creates an element of the type specified. | |
virtual DOMDocumentFragment * | createDocumentFragment ()=0 |
Creates an empty DOMDocumentFragment object. | |
virtual DOMText * | createTextNode (const XMLCh *data)=0 |
Creates a DOMText node given the specified string. | |
virtual DOMComment * | createComment (const XMLCh *data)=0 |
Creates a DOMComment node given the specified string. | |
virtual DOMCDATASection * | createCDATASection (const XMLCh *data)=0 |
Creates a DOMCDATASection node whose value is the specified string. | |
virtual DOMProcessingInstruction * | createProcessingInstruction (const XMLCh *target, const XMLCh *data)=0 |
Creates a DOMProcessingInstruction node given the specified name and data strings. | |
virtual DOMAttr * | createAttribute (const XMLCh *name)=0 |
Creates an DOMAttr of the given name. | |
virtual DOMEntityReference * | createEntityReference (const XMLCh *name)=0 |
Creates an DOMEntityReference object. | |
virtual DOMDocumentType * | getDoctype () const =0 |
The Document Type Declaration (see DOMDocumentType ) associated with this document. | |
virtual DOMImplementation * | getImplementation () const =0 |
The DOMImplementation object that handles this document. | |
virtual DOMElement * | getDocumentElement () const =0 |
This is a convenience attribute that allows direct access to the child node that is the root element of the document. | |
virtual DOMNodeList * | getElementsByTagName (const XMLCh *tagname) const =0 |
Returns a DOMNodeList of all the DOMElement(s) with a given tag name in the order in which they are encountered in a preorder traversal of the DOMDocument tree. | |
Functions introduced in DOM Level 2. | |
virtual DOMNode * | importNode (const DOMNode *importedNode, bool deep)=0 |
Imports a node from another document to this document. | |
virtual DOMElement * | createElementNS (const XMLCh *namespaceURI, const XMLCh *qualifiedName)=0 |
Creates an element of the given qualified name and namespace URI. | |
virtual DOMAttr * | createAttributeNS (const XMLCh *namespaceURI, const XMLCh *qualifiedName)=0 |
Creates an attribute of the given qualified name and namespace URI. | |
virtual DOMNodeList * | getElementsByTagNameNS (const XMLCh *namespaceURI, const XMLCh *localName) const =0 |
Returns a DOMNodeList of all the DOMElement(s) with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the DOMDocument tree. | |
virtual DOMElement * | getElementById (const XMLCh *elementId) const =0 |
Returns the DOMElement whose ID is given by elementId . | |
Functions introduced in DOM Level 3. | |
virtual const XMLCh * | getInputEncoding () const =0 |
An attribute specifying the encoding used for this document at the time of the parsing. | |
virtual const XMLCh * | getXmlEncoding () const =0 |
An attribute specifying, as part of the XML declaration, the encoding of this document. | |
virtual bool | getXmlStandalone () const =0 |
An attribute specifying, as part of the XML declaration, whether this document is standalone. | |
virtual void | setXmlStandalone (bool standalone)=0 |
An attribute specifying, as part of the XML declaration, whether this document is standalone. | |
virtual const XMLCh * | getXmlVersion () const =0 |
An attribute specifying, as part of the XML declaration, the version number of this document. | |
virtual void | setXmlVersion (const XMLCh *version)=0 |
An attribute specifying, as part of the XML declaration, the version number of this document. | |
virtual const XMLCh * | getDocumentURI () const =0 |
The location of the document or null if undefined. | |
virtual void | setDocumentURI (const XMLCh *documentURI)=0 |
The location of the document or null if undefined. | |
virtual bool | getStrictErrorChecking () const =0 |
An attribute specifying whether errors checking is enforced or not. | |
virtual void | setStrictErrorChecking (bool strictErrorChecking)=0 |
An attribute specifying whether errors checking is enforced or not. | |
virtual DOMNode * | renameNode (DOMNode *n, const XMLCh *namespaceURI, const XMLCh *qualifiedName)=0 |
Rename an existing node. | |
virtual DOMNode * | adoptNode (DOMNode *source)=0 |
Changes the ownerDocument of a node, its children, as well as the attached attribute nodes if there are any. | |
virtual void | normalizeDocument ()=0 |
This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form. | |
virtual DOMConfiguration * | getDOMConfig () const =0 |
The configuration used when DOMDocument::normalizeDocument is invoked. | |
Non-standard extension | |
virtual DOMEntity * | createEntity (const XMLCh *name)=0 |
Non-standard extension. | |
virtual DOMDocumentType * | createDocumentType (const XMLCh *name)=0 |
Non-standard extension. | |
virtual DOMDocumentType * | createDocumentType (const XMLCh *qName, const XMLCh *, const XMLCh *) |
virtual DOMNotation * | createNotation (const XMLCh *name)=0 |
Non-standard extension. | |
virtual DOMElement * | createElementNS (const XMLCh *namespaceURI, const XMLCh *qualifiedName, const XMLFileLoc lineNum, const XMLFileLoc columnNum)=0 |
Non-standard extension. | |
Protected Member Functions | |
Hidden constructors | |
DOMDocument () |
DOMDocument
interface represents the entire XML document.
Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a DOMDocument
, the DOMDocument
interface also contains the factory methods needed to create these objects. The DOMNode
objects created have a ownerDocument
attribute which associates them with the DOMDocument
within whose context they were created.
See also the Document Object Model (DOM) Level 2 Core Specification.
|
|
|
Destructor.
|
|
Changes the If the node has a parent it is first removed from its parent child list. This effectively allows moving a subtree from one document to another. The following list describes the specifics for each type of node.
|
|
Creates an
Note that the
|
|
Creates an attribute of the given qualified name and namespace URI.
|
|
Creates a
|
|
Creates a
|
|
Creates an empty
|
|
|
|
Non-standard extension. Create a DOMDocumentType node.
|
|
Creates an element of the type specified.
Note that the instance returned implements the
|
|
Non-standard extension. Creates an element of the given qualified name and namespace URI, and also stores line/column number info. Used by internally XSDXercesDOMParser during schema traversal.
|
|
Creates an element of the given qualified name and namespace URI.
|
|
Non-standard extension. Create a new entity.
|
|
Creates an
In addition, if the referenced entity is known, the child list of the
|
|
Non-standard extension. Create a Notation.
|
|
Creates a
|
|
Creates a
|
|
The Document Type Declaration (see
For XML documents without a document type declaration this returns
|
|
This is a convenience attribute that allows direct access to the child node that is the root element of the document.
|
|
The location of the document or
|
|
The configuration used when DOMDocument::normalizeDocument is invoked.
|
|
Returns the
If no such element exists, returns
|
|
Returns a The returned node list is "live", in that changes to the document tree made after a nodelist was initially returned will be immediately reflected in the node list.
|
|
Returns a
|
|
The A DOM application may use objects from multiple implementations.
|
|
An attribute specifying the encoding used for this document at the time of the parsing.
This is
|
|
An attribute specifying whether errors checking is enforced or not.
When set to
|
|
An attribute specifying, as part of the XML declaration, the encoding of this document.
This is
|
|
An attribute specifying, as part of the XML declaration, whether this document is standalone.
This is
|
|
An attribute specifying, as part of the XML declaration, the version number of this document.
This is
|
|
Imports a node from another document to this document.
The returned node has no parent; (
|
|
This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form.
The actual result depends on the features being set. See
|
|
Rename an existing node.
When possible this simply changes the name of the given node, otherwise this creates a new node with the specified name and replaces the existing node with the new node as described below. This only applies to nodes of type
|
|
The location of the document or
|
|
An attribute specifying whether errors checking is enforced or not.
When set to
|
|
An attribute specifying, as part of the XML declaration, whether this document is standalone.
|
|
An attribute specifying, as part of the XML declaration, the version number of this document.
This is
|