<h1>xercesc::DOMDocument Class Reference</h1><!-- doxytag: class="xercesc::DOMDocument" --><!-- doxytag: inherits="xercesc::DOMDocumentRange,xercesc::DOMXPathEvaluator,xercesc::DOMDocumentTraversal,xercesc::DOMNode" -->The <code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code> interface represents the entire XML document.
<areashape="rect"href="classxercesc_1_1DOMDocumentRange.html"title="xercesc::DOMDocumentRange"alt=""coords="15,6,215,30"><areashape="rect"href="classxercesc_1_1DOMXPathEvaluator.html"title="The evaluation of XPath expressions is provided by DOMXPathEvaluator."alt=""coords="17,54,212,78"><areashape="rect"href="classxercesc_1_1DOMDocumentTraversal.html"title="DOMDocumentTraversal contains methods that create DOMNodeIterators and DOMTreeWalkers..."alt=""coords="7,102,223,126"><areashape="rect"href="classxercesc_1_1DOMNode.html"title="The DOMNode interface is the primary datatype for the entire Document Object Model..."alt=""coords="47,150,183,174"></map>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates an element of the type specified. <ahref="#e85ccc2bef950fc7a97ed628edfd188e"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates an empty <code><aclass="el"href="classxercesc_1_1DOMDocumentFragment.html"title="DOMDocumentFragment is a "lightweight" or "minimal" DOMDocument...">DOMDocumentFragment</a></code> object. <ahref="#9cb25f221e8ce1cd40951b4ed3ec113d"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> node given the specified string. <ahref="#d22c9611afa0947e1b0699c3d879058f"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a <code><aclass="el"href="classxercesc_1_1DOMComment.html"title="This interface inherits from CharacterData and represents the content of a comment...">DOMComment</a></code> node given the specified string. <ahref="#5169031ed4289d87084e9c662f198ab6"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a <code><aclass="el"href="classxercesc_1_1DOMCDATASection.html"title="CDATA sections are used to escape blocks of text containing characters that would...">DOMCDATASection</a></code> node whose value is the specified string. <ahref="#4eb2a430dd3c77d40000594eb25a80f9"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a <code><aclass="el"href="classxercesc_1_1DOMProcessingInstruction.html"title="The DOMProcessingInstruction interface represents a "processing instruction"...">DOMProcessingInstruction</a></code> node given the specified name and data strings. <ahref="#65f8ff9afe0dd0038138859a10ad6ece"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates an <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> of the given name. <ahref="#7288d0935ff48866916dcda2a050d0ca"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates an <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html"title="DOMEntityReference objects may be inserted into the structure model when an entity...">DOMEntityReference</a></code> object. <ahref="#8861289d08c5efc973316cbf4130d9c0"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">The Document Type Declaration (see <code><aclass="el"href="classxercesc_1_1DOMDocumentType.html"title="Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType...">DOMDocumentType</a></code>) associated with this document. <ahref="#698a34a6561e2ecf2883e43d10e2e9a4"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">The <code><aclass="el"href="classxercesc_1_1DOMImplementation.html"title="The DOMImplementation interface provides a number of methods for performing operations...">DOMImplementation</a></code> object that handles this document. <ahref="#707639b27e69e69f8cd032049ce2e34e"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">This is a convenience attribute that allows direct access to the child node that is the root element of the document. <ahref="#09709e8fef5e0eeec5a9378e5aa69af1"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a <code><aclass="el"href="classxercesc_1_1DOMNodeList.html"title="The DOMNodeList interface provides the abstraction of an ordered collection of nodes...">DOMNodeList</a></code> of all the <code>DOMElement(s)</code> with a given tag name in the order in which they are encountered in a preorder traversal of the <code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code> tree. <ahref="#af893c3414d8c80270a31e5079bb6912"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Imports a node from another document to this document. <ahref="#fbd4386d834deaf4a5fd77aa327709a7"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates an element of the given qualified name and namespace URI. <ahref="#57ad839d6e17bc10d0b9239b74b49444"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates an attribute of the given qualified name and namespace URI. <ahref="#68f4951e21f37a4cc1cde7d7a88bf242"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a <code><aclass="el"href="classxercesc_1_1DOMNodeList.html"title="The DOMNodeList interface provides the abstraction of an ordered collection of nodes...">DOMNodeList</a></code> of all the <code>DOMElement(s)</code> with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the <code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code> tree. <ahref="#76a0638aff510d4c6db4ffadd942735c"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <code><aclass="el"href="classxercesc_1_1DOMElement.html"title="By far the vast majority of objects (apart from text) that authors encounter when...">DOMElement</a></code> whose <code>ID</code> is given by <code>elementId</code>. <ahref="#dedb2f19695a35b83fde6a584d4b748f"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">An attribute specifying the encoding used for this document at the time of the parsing. <ahref="#41294dce7bec784014dfc9a36774e87f"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">An attribute specifying, as part of the XML declaration, the encoding of this document. <ahref="#d990c4ad200ffbd79c8d51b53942078a"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">An attribute specifying, as part of the XML declaration, whether this document is standalone. <ahref="#29933f976c29320f1563da63e5a20881"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">An attribute specifying, as part of the XML declaration, whether this document is standalone. <ahref="#616c27be91cf745f08e1f1b30bccb13a"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">An attribute specifying, as part of the XML declaration, the version number of this document. <ahref="#3c5c4935c7165674c667f44e1fe6ced0"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">An attribute specifying, as part of the XML declaration, the version number of this document. <ahref="#e0fb6f84c26cd570e8a8d05885fa7292"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">The location of the document or <code>null</code> if undefined. <ahref="#fe21d6a1919ada2ab34f3f977b25b5e7"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">The location of the document or <code>null</code> if undefined. <ahref="#660099866e9add0a1e1dd1f97c05a2e5"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Changes the <code>ownerDocument</code> of a node, its children, as well as the attached attribute nodes if there are any. <ahref="#f45712bf8cda8015cbe97d39dd196284"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form. <ahref="#c4a3e3ffb33ce907f211d216b356f8fb"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">The configuration used when <aclass="el"href="classxercesc_1_1DOMDocument.html#c4a3e3ffb33ce907f211d216b356f8fb"title="This method acts as if the document was going through a save and load cycle, putting...">DOMDocument::normalizeDocument</a> is invoked. <ahref="#5a91a9920107fdd96f31062e329e6889"></a><br></td></tr>
The <code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code> interface represents the entire XML document.
Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a <code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code>, the <code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code> interface also contains the factory methods needed to create these objects. The <code><aclass="el"href="classxercesc_1_1DOMNode.html"title="The DOMNode interface is the primary datatype for the entire Document Object Model...">DOMNode</a></code> objects created have a <code>ownerDocument</code> attribute which associates them with the <code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code> within whose context they were created. <p>
See also the <ahref="http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113">Document Object Model (DOM) Level 2 Core Specification</a>. <hr><h2>Constructor & Destructor Documentation</h2>
Note that the instance returned implements the <code><aclass="el"href="classxercesc_1_1DOMElement.html"title="By far the vast majority of objects (apart from text) that authors encounter when...">DOMElement</a></code> interface, so attributes can be specified directly on the returned object. <br>
In addition, if there are known attributes with default values, <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> nodes representing them are automatically created and attached to the element. <br>
<tr><tdvalign="top"></td><tdvalign="top"><em>tagName</em> </td><td>The name of the element type to instantiate. For XML, this is case-sensitive. </td></tr>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>A new <code><aclass="el"href="classxercesc_1_1DOMElement.html"title="By far the vast majority of objects (apart from text) that authors encounter when...">DOMElement</a></code> object with the <code>nodeName</code> attribute set to <code>tagName</code>, and <code>localName</code>, <code>prefix</code>, and <code>namespaceURI</code> set to <code>null</code>. </dd></dl>
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. </td></tr>
Creates an empty <code><aclass="el"href="classxercesc_1_1DOMDocumentFragment.html"title="DOMDocumentFragment is a "lightweight" or "minimal" DOMDocument...">DOMDocumentFragment</a></code> object.
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>A new <code><aclass="el"href="classxercesc_1_1DOMDocumentFragment.html"title="DOMDocumentFragment is a "lightweight" or "minimal" DOMDocument...">DOMDocumentFragment</a></code>. </dd></dl>
Creates a <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> node given the specified string.
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>The new <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> object. </dd></dl>
Creates a <code><aclass="el"href="classxercesc_1_1DOMComment.html"title="This interface inherits from CharacterData and represents the content of a comment...">DOMComment</a></code> node given the specified string.
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>The new <code><aclass="el"href="classxercesc_1_1DOMComment.html"title="This interface inherits from CharacterData and represents the content of a comment...">DOMComment</a></code> object. </dd></dl>
Creates a <code><aclass="el"href="classxercesc_1_1DOMCDATASection.html"title="CDATA sections are used to escape blocks of text containing characters that would...">DOMCDATASection</a></code> node whose value is the specified string.
<tr><tdvalign="top"></td><tdvalign="top"><em>data</em> </td><td>The data for the <code><aclass="el"href="classxercesc_1_1DOMCDATASection.html"title="CDATA sections are used to escape blocks of text containing characters that would...">DOMCDATASection</a></code> contents. </td></tr>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>The new <code><aclass="el"href="classxercesc_1_1DOMCDATASection.html"title="CDATA sections are used to escape blocks of text containing characters that would...">DOMCDATASection</a></code> object. </dd></dl>
Creates a <code><aclass="el"href="classxercesc_1_1DOMProcessingInstruction.html"title="The DOMProcessingInstruction interface represents a "processing instruction"...">DOMProcessingInstruction</a></code> node given the specified name and data strings.
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>INVALID_CHARACTER_ERR: Raised if the specified target contains an illegal character. </td></tr>
Creates an <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> of the given name.
Note that the <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> instance can then be set on an <code><aclass="el"href="classxercesc_1_1DOMElement.html"title="By far the vast majority of objects (apart from text) that authors encounter when...">DOMElement</a></code> using the <code>setAttributeNode</code> method. <br>
To create an attribute with a qualified name and namespace URI, use the <code>createAttributeNS</code> method. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>name</em> </td><td>The name of the attribute. </td></tr>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>A new <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> object with the <code>nodeName</code> attribute set to <code>name</code>, and <code>localName</code>, <code>prefix</code>, and <code>namespaceURI</code> set to <code>null</code>. The value of the attribute is the empty string. </dd></dl>
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. </td></tr>
Creates an <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html"title="DOMEntityReference objects may be inserted into the structure model when an entity...">DOMEntityReference</a></code> object.
In addition, if the referenced entity is known, the child list of the <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html"title="DOMEntityReference objects may be inserted into the structure model when an entity...">DOMEntityReference</a></code> node is made the same as that of the corresponding <code><aclass="el"href="classxercesc_1_1DOMEntity.html"title="This interface represents an entity, either parsed or unparsed, in an XML document...">DOMEntity</a></code> node.If any descendant of the <code><aclass="el"href="classxercesc_1_1DOMEntity.html"title="This interface represents an entity, either parsed or unparsed, in an XML document...">DOMEntity</a></code> node has an unbound namespace prefix, the corresponding descendant of the created <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html"title="DOMEntityReference objects may be inserted into the structure model when an entity...">DOMEntityReference</a></code> node is also unbound; (its <code>namespaceURI</code> is <code>null</code>). The DOM Level 2 does not support any mechanism to resolve namespace prefixes. <dlcompact><dt><b>Parameters:</b></dt><dd>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>The new <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html"title="DOMEntityReference objects may be inserted into the structure model when an entity...">DOMEntityReference</a></code> object. </dd></dl>
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. </td></tr>
The Document Type Declaration (see <code><aclass="el"href="classxercesc_1_1DOMDocumentType.html"title="Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType...">DOMDocumentType</a></code>) associated with this document.
For XML documents without a document type declaration this returns <code>null</code>. The DOM Level 2 does not support editing the Document Type Declaration. <code>docType</code> cannot be altered in any way, including through the use of methods inherited from the <code><aclass="el"href="classxercesc_1_1DOMNode.html"title="The DOMNode interface is the primary datatype for the entire Document Object Model...">DOMNode</a></code> interface, such as <code>insertNode</code> or <code>removeNode</code>. <dlclass="since"compact><dt><b>Since:</b></dt><dd>DOM Level 1 </dd></dl>
The <code><aclass="el"href="classxercesc_1_1DOMImplementation.html"title="The DOMImplementation interface provides a number of methods for performing operations...">DOMImplementation</a></code> object that handles this document.
Returns a <code><aclass="el"href="classxercesc_1_1DOMNodeList.html"title="The DOMNodeList interface provides the abstraction of an ordered collection of nodes...">DOMNodeList</a></code> of all the <code>DOMElement(s)</code> with a given tag name in the order in which they are encountered in a preorder traversal of the <code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code> tree.
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. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tr><tdvalign="top"></td><tdvalign="top"><em>tagname</em> </td><td>The name of the tag to match on. The special value "*" matches all tags. </td></tr>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>A new <code><aclass="el"href="classxercesc_1_1DOMNodeList.html"title="The DOMNodeList interface provides the abstraction of an ordered collection of nodes...">DOMNodeList</a></code> object containing all the matched <code>DOMElement(s)</code>. </dd></dl>
The returned node has no parent; (<code>parentNode</code> is <code>null</code>). The source node is not altered or removed from the original document; this method creates a new copy of the source node. <br>
For all nodes, importing a node creates a node object owned by the importing document, with attribute values identical to the source node's <code>nodeName</code> and <code>nodeType</code>, plus the attributes related to namespaces (<code>prefix</code>, <code>localName</code>, and <code>namespaceURI</code>). As in the <code>cloneNode</code> operation on a <code><aclass="el"href="classxercesc_1_1DOMNode.html"title="The DOMNode interface is the primary datatype for the entire Document Object Model...">DOMNode</a></code>, the source node is not altered. <br>
Additional information is copied as appropriate to the <code>nodeType</code>, attempting to mirror the behavior expected if a fragment of XML source was copied from one document to another, recognizing that the two documents may have different DTDs in the XML case. The following list describes the specifics for each type of node. <dl>
<dd>The <code>ownerElement</code> attribute is set to <code>null</code> and the <code>specified</code> flag is set to <code>true</code> on the generated <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code>. The descendants of the source <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> are recursively imported and the resulting nodes reassembled to form the corresponding subtree. Note that the <code>deep</code> parameter has no effect on <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> nodes; they always carry their children with them when imported. </dd>
<dd>If the <code>deep</code> option was set to <code>true</code>, the descendants of the source element are recursively imported and the resulting nodes reassembled to form the corresponding subtree. Otherwise, this simply generates an empty <code><aclass="el"href="classxercesc_1_1DOMDocumentFragment.html"title="DOMDocumentFragment is a "lightweight" or "minimal" DOMDocument...">DOMDocumentFragment</a></code>. </dd>
<dd><code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code> nodes cannot be imported. </dd>
<dd><code><aclass="el"href="classxercesc_1_1DOMDocumentType.html"title="Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType...">DOMDocumentType</a></code> nodes cannot be imported. </dd>
<dd>Specified attribute nodes of the source element are imported, and the generated <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> nodes are attached to the generated <code><aclass="el"href="classxercesc_1_1DOMElement.html"title="By far the vast majority of objects (apart from text) that authors encounter when...">DOMElement</a></code>. Default attributes are not copied, though if the document being imported into defines default attributes for this element name, those are assigned. If the <code>importNode</code><code>deep</code> parameter was set to <code>true</code>, the descendants of the source element are recursively imported and the resulting nodes reassembled to form the corresponding subtree. </dd>
<dd><code><aclass="el"href="classxercesc_1_1DOMEntity.html"title="This interface represents an entity, either parsed or unparsed, in an XML document...">DOMEntity</a></code> nodes can be imported, however in the current release of the DOM the <code><aclass="el"href="classxercesc_1_1DOMDocumentType.html"title="Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType...">DOMDocumentType</a></code> is readonly. Ability to add these imported nodes to a <code><aclass="el"href="classxercesc_1_1DOMDocumentType.html"title="Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType...">DOMDocumentType</a></code> will be considered for addition to a future release of the DOM.On import, the <code>publicId</code>, <code>systemId</code>, and <code>notationName</code> attributes are copied. If a <code>deep</code> import is requested, the descendants of the the source <code><aclass="el"href="classxercesc_1_1DOMEntity.html"title="This interface represents an entity, either parsed or unparsed, in an XML document...">DOMEntity</a></code> are recursively imported and the resulting nodes reassembled to form the corresponding subtree. </dd>
<dd>Only the <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html"title="DOMEntityReference objects may be inserted into the structure model when an entity...">DOMEntityReference</a></code> itself is copied, even if a <code>deep</code> import is requested, since the source and destination documents might have defined the entity differently. If the document being imported into provides a definition for this entity name, its value is assigned. </dd>
<dd><code><aclass="el"href="classxercesc_1_1DOMNotation.html"title="This interface represents a notation declared in the DTD.">DOMNotation</a></code> nodes can be imported, however in the current release of the DOM the <code><aclass="el"href="classxercesc_1_1DOMDocumentType.html"title="Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType...">DOMDocumentType</a></code> is readonly. Ability to add these imported nodes to a <code><aclass="el"href="classxercesc_1_1DOMDocumentType.html"title="Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType...">DOMDocumentType</a></code> will be considered for addition to a future release of the DOM.On import, the <code>publicId</code> and <code>systemId</code> attributes are copied. Note that the <code>deep</code> parameter has no effect on <code><aclass="el"href="classxercesc_1_1DOMNotation.html"title="This interface represents a notation declared in the DTD.">DOMNotation</a></code> nodes since they never have any children. </dd>
<dd>These three types of nodes inheriting from <code><aclass="el"href="classxercesc_1_1DOMCharacterData.html"title="The DOMCharacterData interface extends DOMNode with a set of attributes and methods...">DOMCharacterData</a></code> copy their <code>data</code> and <code>length</code> attributes from those of the source node. </dd>
<tr><tdvalign="top"></td><tdvalign="top"><em>deep</em> </td><td>If <code>true</code>, recursively import the subtree under the specified node; if <code>false</code>, import only the node itself, as explained above. This has no effect on <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> , <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html"title="DOMEntityReference objects may be inserted into the structure model when an entity...">DOMEntityReference</a></code>, and <code><aclass="el"href="classxercesc_1_1DOMNotation.html"title="This interface represents a notation declared in the DTD.">DOMNotation</a></code> nodes. </td></tr>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>The imported node that belongs to this <code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code>. </dd></dl>
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported. </td></tr>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>A new <code><aclass="el"href="classxercesc_1_1DOMElement.html"title="By far the vast majority of objects (apart from text) that authors encounter when...">DOMElement</a></code> object with the following attributes: <tableborder="1"cellspacing="3"cellpadding="3">
<tdvalign="top"rowspan="1"colspan="1"><code>DOMNode.prefix</code></td><tdvalign="top"rowspan="1"colspan="1">prefix, extracted from <code>qualifiedName</code>, or <code>null</code> if there is no prefix </td></tr>
<tr>
<tdvalign="top"rowspan="1"colspan="1"><code>DOMNode.localName</code></td><tdvalign="top"rowspan="1"colspan="1">local name, extracted from <code>qualifiedName</code></td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character, per the XML 1.0 specification . <br>
NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is malformed per the Namespaces in XML specification, if the <code>qualifiedName</code> has a prefix and the <code>namespaceURI</code> is <code>null</code>, or if the <code>qualifiedName</code> has a prefix that is "xml" and the <code>namespaceURI</code> is different from " <ahref="http://www.w3.org/XML/1998/namespace">http://www.w3.org/XML/1998/namespace</a>" . <br>
NOT_SUPPORTED_ERR: Always thrown if the current document does not support the <code>"XML"</code> feature, since namespaces were defined by XML. </td></tr>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>A new <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> object with the following attributes: <tableborder="1"cellspacing="3"cellpadding="3">
<tdvalign="top"rowspan="1"colspan="1"><code>DOMNode.prefix</code></td><tdvalign="top"rowspan="1"colspan="1">prefix, extracted from <code>qualifiedName</code>, or <code>null</code> if there is no prefix </td></tr>
<tr>
<tdvalign="top"rowspan="1"colspan="1"><code>DOMNode.localName</code></td><tdvalign="top"rowspan="1"colspan="1">local name, extracted from <code>qualifiedName</code></td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character, per the XML 1.0 specification . <br>
NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is malformed per the Namespaces in XML specification, if the <code>qualifiedName</code> has a prefix and the <code>namespaceURI</code> is <code>null</code>, if the <code>qualifiedName</code> has a prefix that is "xml" and the <code>namespaceURI</code> is different from " <ahref="http://www.w3.org/XML/1998/namespace">http://www.w3.org/XML/1998/namespace</a>", or if the <code>qualifiedName</code>, or its prefix, is "xmlns" and the <code>namespaceURI</code> is different from " <ahref="http://www.w3.org/2000/xmlns/">http://www.w3.org/2000/xmlns/</a>". <br>
NOT_SUPPORTED_ERR: Always thrown if the current document does not support the <code>"XML"</code> feature, since namespaces were defined by XML. </td></tr>
Returns a <code><aclass="el"href="classxercesc_1_1DOMNodeList.html"title="The DOMNodeList interface provides the abstraction of an ordered collection of nodes...">DOMNodeList</a></code> of all the <code>DOMElement(s)</code> with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the <code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code> tree.
<tr><tdvalign="top"></td><tdvalign="top"><em>namespaceURI</em> </td><td>The namespace URI of the elements to match on. The special value "*" matches all namespaces. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>localName</em> </td><td>The local name of the elements to match on. The special value "*" matches all local names. </td></tr>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>A new <code><aclass="el"href="classxercesc_1_1DOMNodeList.html"title="The DOMNodeList interface provides the abstraction of an ordered collection of nodes...">DOMNodeList</a></code> object containing all the matched <code>DOMElement(s)</code>. </dd></dl>
Returns the <code><aclass="el"href="classxercesc_1_1DOMElement.html"title="By far the vast majority of objects (apart from text) that authors encounter when...">DOMElement</a></code> whose <code>ID</code> is given by <code>elementId</code>.
If no such element exists, returns <code>null</code>. Behavior is not defined if more than one element has this <code>ID</code>. The DOM implementation must have information that says which attributes are of type ID. Attributes with the name "ID" are not of type ID unless so defined. Implementations that do not know whether attributes are of type ID or not are expected to return <code>null</code>. <dlcompact><dt><b>Parameters:</b></dt><dd>
This is <code>null</code> when it is not known, such as when the <aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a> was created in memory.<p>
This is <code>null</code> when unspecified or when it is not known, such as when the <aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a> was created in memory.<p>
Beware that when the <code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code> supports the feature "HTML" , the href attribute of the HTML BASE element takes precedence over this attribute.<p>
Beware that when the <code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code> supports the feature "HTML" , the href attribute of the HTML BASE element takes precedence over this attribute.<p>
When set to <code>false</code>, the implementation is free to not test every possible error case normally defined on DOM operations, and not raise any <code><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></code>. In case of error, the behavior is undefined. This attribute is <code>true</code> by defaults.<p>
An attribute specifying whether errors checking is enforced or not.
<p>
When set to <code>false</code>, the implementation is free to not test every possible error case normally defined on DOM operations, and not raise any <code><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></code>. In case of error, the behavior is undefined. This attribute is <code>true</code> by defaults.<p>
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 <code>ELEMENT_NODE</code> and <code>ATTRIBUTE_NODE</code>. <br>
When a new node is created, the following operations are performed: the new node is created, any registered event listener is registered on the new node, any user data attached to the old node is removed from that node, the old node is removed from its parent if it has one, the children are moved to the new node, if the renamed node is an <code><aclass="el"href="classxercesc_1_1DOMElement.html"title="By far the vast majority of objects (apart from text) that authors encounter when...">DOMElement</a></code> its attributes are moved to the new node, the new node is inserted at the position the old node used to have in its parent's child nodes list if it has one, the user data that was attached to the old node is attach to the new node, the user data event <code>NODE_RENAMED</code> is fired. <br>
When the node being renamed is an <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> that is attached to an <code><aclass="el"href="classxercesc_1_1DOMElement.html"title="By far the vast majority of objects (apart from text) that authors encounter when...">DOMElement</a></code>, the node is first removed from the <code><aclass="el"href="classxercesc_1_1DOMElement.html"title="By far the vast majority of objects (apart from text) that authors encounter when...">DOMElement</a></code> attributes map. Then, once renamed, either by modifying the existing node or creating a new one as described above, it is put back.<p>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>The renamed node. This is either the specified node or the new node that was created to replace the specified node. </dd></dl>
<dlcompact><dt><b>Exceptions:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>NOT_SUPPORTED_ERR: Raised when the type of the specified node is neither <code>ELEMENT_NODE</code> nor <code>ATTRIBUTE_NODE</code>. <br>
WRONG_DOCUMENT_ERR: Raised when the specified node was created from a different document than this document. <br>
NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is malformed per the Namespaces in XML specification, if the <code>qualifiedName</code> has a prefix and the <code>namespaceURI</code> is <code>null</code>, or if the <code>qualifiedName</code> has a prefix that is "xml" and the <code>namespaceURI</code> is different from " <ahref="http://www.w3.org/XML/1998/namespace">http://www.w3.org/XML/1998/namespace</a>" . Also raised, when the node being renamed is an attribute, if the <code>qualifiedName</code>, or its prefix, is "xmlns" and the <code>namespaceURI</code> is different from "http://www.w3.org/2000/xmlns/". </td></tr>
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.<p>
<dd>The <code>ownerElement</code> attribute is set to <code>null</code> and the <code>specified</code> flag is set to <code>true</code> on the adopted <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code>. The descendants of the source <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> are recursively adopted. </dd>
<dd><code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code> nodes cannot be adopted. </dd>
<dd><code><aclass="el"href="classxercesc_1_1DOMDocumentType.html"title="Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType...">DOMDocumentType</a></code> nodes cannot be adopted. </dd>
<dd>Specified attribute nodes of the source element are adopted, and the generated <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> nodes. Default attributes are discarded, though if the document being adopted into defines default attributes for this element name, those are assigned. The descendants of the source element are recursively adopted. </dd>
<dd><code><aclass="el"href="classxercesc_1_1DOMEntity.html"title="This interface represents an entity, either parsed or unparsed, in an XML document...">DOMEntity</a></code> nodes cannot be adopted. </dd>
<dd>Only the <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html"title="DOMEntityReference objects may be inserted into the structure model when an entity...">DOMEntityReference</a></code> node itself is adopted, the descendants are discarded, since the source and destination documents might have defined the entity differently. If the document being imported into provides a definition for this entity name, its value is assigned. </dd>
<dd><code><aclass="el"href="classxercesc_1_1DOMNotation.html"title="This interface represents a notation declared in the DTD.">DOMNotation</a></code> nodes cannot be adopted. </dd>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>The adopted node, or <code>null</code> if this operation fails, such as when the source node comes from a different implementation. </dd></dl>
<tr><tdvalign="top"></td><tdvalign="top"><em><aclass="el"href="classxercesc_1_1DOMException.html">DOMException</a></em> </td><td>NOT_SUPPORTED_ERR: Raised if the source node is of type <code>DOCUMENT</code>, <code>DOCUMENT_TYPE</code>. <br>
NO_MODIFICATION_ALLOWED_ERR: Raised when the source node is readonly. </td></tr>
The actual result depends on the features being set. See <code><aclass="el"href="classxercesc_1_1DOMConfiguration.html"title="The DOMConfiguration interface represents the configuration of a document and maintains...">DOMConfiguration</a></code> for details.<p>
Noticeably this method normalizes <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> nodes, makes the document "namespace wellformed", according to the algorithm described below in pseudo code, by adding missing namespace declaration attributes and adding or changing namespace prefixes, updates the replacement tree of <code><aclass="el"href="classxercesc_1_1DOMEntityReference.html"title="DOMEntityReference objects may be inserted into the structure model when an entity...">DOMEntityReference</a></code> nodes, normalizes attribute values, etc. <br>
Mutation events, when supported, are generated to reflect the changes occuring on the document. Note that this is a partial implementation. Not all the required features are implemented. Currently <code><aclass="el"href="classxercesc_1_1DOMAttr.html"title="The DOMAttr class refers to an attribute of an XML element.">DOMAttr</a></code> and <code><aclass="el"href="classxercesc_1_1DOMText.html"title="The DOMText interface inherits from DOMCharacterData and represents the textual content...">DOMText</a></code> nodes are normalized. Features to remove <code><aclass="el"href="classxercesc_1_1DOMComment.html"title="This interface inherits from CharacterData and represents the content of a comment...">DOMComment</a></code> and <code><aclass="el"href="classxercesc_1_1DOMCDATASection.html"title="CDATA sections are used to escape blocks of text containing characters that would...">DOMCDATASection</a></code> work. <dlclass="since"compact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
The configuration used when <aclass="el"href="classxercesc_1_1DOMDocument.html#c4a3e3ffb33ce907f211d216b356f8fb"title="This method acts as if the document was going through a save and load cycle, putting...">DOMDocument::normalizeDocument</a> is invoked.
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>The <code><aclass="el"href="classxercesc_1_1DOMConfiguration.html"title="The DOMConfiguration interface represents the configuration of a document and maintains...">DOMConfiguration</a></code> from this <code><aclass="el"href="classxercesc_1_1DOMDocument.html"title="The DOMDocument interface represents the entire XML document.">DOMDocument</a></code></dd></dl>
Create a <aclass="el"href="classxercesc_1_1DOMDocumentType.html"title="Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType...">DOMDocumentType</a> node. <dlclass="return"compact><dt><b>Returns:</b></dt><dd>A <code><aclass="el"href="classxercesc_1_1DOMDocumentType.html"title="Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType...">DOMDocumentType</a></code> that references the newly created <aclass="el"href="classxercesc_1_1DOMDocumentType.html"title="Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType...">DOMDocumentType</a> node. </dd></dl>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>A <code><aclass="el"href="classxercesc_1_1DOMNotation.html"title="This interface represents a notation declared in the DTD.">DOMNotation</a></code> that references the newly created <aclass="el"href="classxercesc_1_1DOMNotation.html"title="This interface represents a notation declared in the DTD.">DOMNotation</a> node. </dd></dl>
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.<p>
<dlclass="see"compact><dt><b>See also:</b></dt><dd><aclass="el"href="classxercesc_1_1DOMDocument.html#57ad839d6e17bc10d0b9239b74b49444"title="Creates an element of the given qualified name and namespace URI.">createElementNS(const XMLCh *namespaceURI, const XMLCh *qualifiedName)</a></dd></dl>