oracle.xdb.dom

## Class XDBDocument

- java.lang.Object
- - oracle.xdb.dom.XDBNode
  - - oracle.xdb.dom.XDBDocument

All Implemented Interfaces:
  Document, Node

Direct Known Subclasses:
  XDBBinaryDocument

Deprecated.
as of Oracle Database 11g release 1, use oracle.xml.parser.v2.XMLDocument

    public class XDBDocument
    extends XDBNode
    implements Document

### Field Summary

### Fields inherited from interface org.w3c.dom.Node

`ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE`

### Constructor Summary

Constructors
Constructor and Description
`XDBDocument()` Deprecated.
`XDBDocument(byte[] source)` Deprecated.
`XDBDocument(java.sql.Connection conn)` Deprecated.
`XDBDocument(java.sql.Connection conn, byte[] source)` Deprecated.
`XDBDocument(java.sql.Connection conn, long xobd)` Deprecated.
`XDBDocument(java.sql.Connection conn, java.lang.String source)` Deprecated.
`XDBDocument(java.lang.String source)` Deprecated.
`XDBDocument(XMLType parxmlt, java.sql.Connection conn, long xobd)` Deprecated.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
`Node` `adoptNode(Node source)` Deprecated.
`Node` `appendChild(Node arg)` Deprecated. append the given node to the list of children of this node.
`void` `close()` Deprecated.
`Attr` `createAttribute(java.lang.String qname)` Deprecated. create an empty attribute node.
`Attr` `createAttributeNS(java.lang.String nsURI, java.lang.String qname)` Deprecated. create an empty attribute node given the namespace information.
`CDATASection` `createCDATASection(java.lang.String data)` Deprecated. create a CDATA section node.
`Comment` `createComment(java.lang.String data)` Deprecated. create a comment node.
`DocumentFragment` `createDocumentFragment()` Deprecated. create an empty document fragment.
`Element` `createElement(java.lang.String tagName)` Deprecated. create and Return a new empty element associated with the document.
`Element` `createElementNS(java.lang.String nsURI, java.lang.String qname)` Deprecated. create and Return a new empty element associated with the document.
`EntityReference` `createEntityReference(java.lang.String name)` Deprecated. create an entity reference node.
`ProcessingInstruction` `createProcessingInstruction(java.lang.String target, java.lang.String data)` Deprecated. create a processing instruction node.
`Text` `createTextNode(java.lang.String data)` Deprecated. create an empty text node.
`void` `finalize()` Deprecated.
`DocumentType` `getDoctype()` Deprecated. Returns the document type defn. of the doc.
`Element` `getDocumentElement()` Deprecated. Returns the root element of the document.
`java.lang.String` `getDocumentURI()` Deprecated.
`DOMConfiguration` `getDomConfig()` Deprecated.
`Element` `getElementById(java.lang.String id)` Deprecated. get elements of the given ID with a pre-order traversal of the document tree.
`NodeList` `getElementsByTagName(java.lang.String tagname)` Deprecated. get elements of the given tagname with a pre-order traversal of the document tree.
`NodeList` `getElementsByTagNameNS(java.lang.String nsURI, java.lang.String tagname)` Deprecated. get elements of the given tagname and ns URI with a pre-order traversal of the document tree.
`Node` `getFirstChild()` Deprecated. Returns the first child of the node. must be overriden derived classes which support this
`static long` `getGP(java.sql.Connection conn)` Deprecated.
`DOMImplementation` `getImplementation()` Deprecated. Returns the dom implementation object.
`java.lang.String` `getInputEncoding()` Deprecated.
`Node` `getLastChild()` Deprecated. Returns the last child of the node. must be overriden derived classes which support this
`Node` `getNextSibling()` Deprecated. Returns the next sibling of the node. must be overriden derived classes which support this
`java.lang.String` `getNodeName()` Deprecated. get the name of the node
`Document` `getOwnerDocument()` Deprecated. the owner document for this node
`Node` `getPreviousSibling()` Deprecated. Returns the previous sibling of the node. must be overriden derived classes which support this
`boolean` `getStrictErrorChecking()` Deprecated.
`java.lang.String` `getXmlEncoding()` Deprecated.
`boolean` `getXmlStandalone()` Deprecated.
`java.lang.String` `getXmlVersion()` Deprecated.
`Node` `importNode(Node importNode, boolean deep)` Deprecated. import the given node from the original document based on the rules specified by the DOM specification
`Node` `insertBefore(Node newChild, Node refChild)` Deprecated. insert the given node before the ref node.
`boolean` `isClosed()` Deprecated.
`void` `normalizeDocument()` Deprecated.
`Node` `removeChild(Node arg)` Deprecated. remove the given node from the node.
`Node` `renameNode(Node n, java.lang.String namespaceURI, java.lang.String qualifiedName)` Deprecated.
`Node` `replaceChild(Node newChild, Node oldChild)` Deprecated. replace the oldchild node with the newchild node.
`void` `setDocumentURI(java.lang.String documentURI)` Deprecated.
`void` `setStrictErrorChecking(boolean strictErrorChecking)` Deprecated.
`void` `setXmlStandalone(boolean xmlStandalone)` Deprecated.
`void` `setXmlVersion(java.lang.String xmlVersion)` Deprecated.

### Methods inherited from class oracle.xdb.dom.XDBNode

`cloneNode, compareDocumentPosition, equals, getAttributes, getBaseURI, getChildNodes, getExpandedName, getFeature, getInputStream, getLocalName, getNamespaceURI, getNodeType, getNodeValue, getParentNode, getPrefix, getPrimitiveType, getQualifiedName, getSchemaNode, getTextContent, getUserData, hasAttributes, hasChildNodes, hashCode, isDefaultNamespace, isEqualNode, isNilled, isSameNode, isSchemaBased, isSupported, lookupNamespaceURI, lookupPrefix, normalize, setNodeValue, setNodeXob, setOwner, setPrefix, setTextContent, setUserData, setXobCstate, toCState, toString, write, writeToOutputStream`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.w3c.dom.Node

`cloneNode, getAttributes, getChildNodes, getLocalName, getNamespaceURI, getNodeType, getNodeValue, getParentNode, getPrefix, hasAttributes, hasChildNodes, isSupported, normalize, setNodeValue, setPrefix`

### Constructor Detail

#### XDBDocument

    public XDBDocument()

Deprecated.

#### XDBDocument

    public XDBDocument(java.sql.Connection conn)
                throws java.lang.Exception

Deprecated.

Throws:
  `java.lang.Exception`

#### XDBDocument

    public XDBDocument(java.lang.String source)

Deprecated.

#### XDBDocument

    public XDBDocument(java.sql.Connection conn,
                       java.lang.String source)
                throws java.lang.Exception

Deprecated.

Throws:
  `java.lang.Exception`

#### XDBDocument

    public XDBDocument(byte[] source)

Deprecated.

#### XDBDocument

    public XDBDocument(java.sql.Connection conn,
                       byte[] source)
                throws java.lang.Exception

Deprecated.

Throws:
  `java.lang.Exception`

#### XDBDocument

    public XDBDocument(java.sql.Connection conn,
                       long xobd)
                throws XDBDOMException

Deprecated.

Throws:
  `XDBDOMException`

#### XDBDocument

    public XDBDocument(XMLType parxmlt,
                       java.sql.Connection conn,
                       long xobd)
                throws XDBDOMException

Deprecated.

Throws:
  `XDBDOMException`

### Method Detail

#### getDoctype

    public DocumentType getDoctype()

Deprecated.
Returns the document type defn. of the doc. We always return null

Specified by:
  `getDoctype` in interface `Document`
Returns:
  the document type defn. of the document.

#### getImplementation

    public DOMImplementation getImplementation()

Deprecated.
Returns the dom implementation object.

Specified by:
  `getImplementation` in interface `Document`
Returns:
  the XDBDomImplementation object.

#### getDocumentElement

    public Element getDocumentElement()

Deprecated.
Returns the root element of the document.

Specified by:
  `getDocumentElement` in interface `Document`
Returns:
  the root XDBElement of the XMLType.

#### createElement

    public Element createElement(java.lang.String tagName)
                          throws DOMException

Deprecated.
create and Return a new empty element associated with the document. i.e. element with no children and not in the XMLType hierarchy.

Specified by:
  `createElement` in interface `Document`
Parameters:
  `tagName` - The name of the element type to instantiate. For XML, this is case-sensitive. For HTML, the `tagName` parameter may be provided in any case, but it must be mapped to the canonical uppercase form by the DOM implementation.
Returns:
  a new XDBElement.
Throws:
  `DOMException` - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.

#### createDocumentFragment

    public DocumentFragment createDocumentFragment()

Deprecated.
create an empty document fragment.

Specified by:
  `createDocumentFragment` in interface `Document`
Returns:
  a Document Fragment object.

#### createTextNode

    public Text createTextNode(java.lang.String data)

Deprecated.
create an empty text node.

Specified by:
  `createTextNode` in interface `Document`
Parameters:
  `data` - The data for the node.
Returns:
  a text node object.

#### createComment

    public Comment createComment(java.lang.String data)

Deprecated.
create a comment node. Not implemented yet.

Specified by:
  `createComment` in interface `Document`
Parameters:
  `data` - The data for the node.
Returns:
  a comment node object.

#### createCDATASection

    public CDATASection createCDATASection(java.lang.String data)
                                    throws DOMException

Deprecated.
create a CDATA section node. Not implemented yet.

Specified by:
  `createCDATASection` in interface `Document`
Parameters:
  `data` - The data for the `CDATASection` contents.
Returns:
  a cdatasection object.
Throws:
  `DOMException` - NOT_SUPPORTED_ERR: Raised if this document is an HTML document.

#### createProcessingInstruction

    public ProcessingInstruction createProcessingInstruction(java.lang.String target,
                                                             java.lang.String data)
                                                      throws DOMException

Deprecated.
create a processing instruction node.

Specified by:
  `createProcessingInstruction` in interface `Document`
Parameters:
  `target` - The target part of the processing instruction.
  `data` - The data for the node.
Returns:
  a PI object.
Throws:
  `DOMException` - INVALID_CHARACTER_ERR: Raised if the specified target contains an illegal character.
  NOT_SUPPORTED_ERR: Raised if this document is an HTML document.

#### createAttribute

    public Attr createAttribute(java.lang.String qname)
                         throws DOMException

Deprecated.
create an empty attribute node.

Specified by:
  `createAttribute` in interface `Document`
Parameters:
  `qname` - The name of the attribute.
Returns:
  an attribute object.
Throws:
  `DOMException` - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.

#### createEntityReference

    public EntityReference createEntityReference(java.lang.String name)
                                          throws DOMException

Deprecated.
create an entity reference node. We do not implement it

Specified by:
  `createEntityReference` in interface `Document`
Parameters:
  `name` - The name of the entity to reference.
Returns:
  an entity reference object.
Throws:
  `DOMException` - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
  NOT_SUPPORTED_ERR: Raised if this document is an HTML document.

#### getElementsByTagName

    public NodeList getElementsByTagName(java.lang.String tagname)

Deprecated.
get elements of the given tagname with a pre-order traversal of the document tree.

Specified by:
  `getElementsByTagName` in interface `Document`
Parameters:
  `tagname` - The name of the tag to match on. The special value "*" matches all tags.
Returns:
  a Nodelist of the matched items.

#### importNode

    public Node importNode(Node importNode,
                           boolean deep)
                    throws DOMException

Deprecated.
import the given node from the original document based on the rules specified by the DOM specification

Specified by:
  `importNode` in interface `Document`
Parameters:
  `importNode` - The node to import.
  `deep` - If `true`, recursively import the subtree under the specified node; if `false`, import only the node itself, as explained above. This has no effect on `Attr` , `EntityReference`, and `Notation` nodes.
Returns:
  a new Node.
Throws:
  `DOMException` - NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported.

#### createElementNS

    public Element createElementNS(java.lang.String nsURI,
                                   java.lang.String qname)
                            throws DOMException

Deprecated.
create and Return a new empty element associated with the document. i.e. element with no children and not in the XMLType hierarchy. This function uses the namespace information as well.

Specified by:
  `createElementNS` in interface `Document`
Parameters:
  `nsURI` - The namespace URI of the element to create.
  `qname` - The qualified name of the element type to instantiate.
Returns:
  a new XDBElement.
Throws:
  `DOMException` - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.
  NAMESPACE_ERR: Raised if the `qualifiedName` is malformed, if the `qualifiedName` has a prefix and the `namespaceURI` is `null`, or if the `qualifiedName` has a prefix that is "xml" and the `namespaceURI` is different from " http://www.w3.org/XML/1998/namespace" .

#### createAttributeNS

    public Attr createAttributeNS(java.lang.String nsURI,
                                  java.lang.String qname)
                           throws DOMException

Deprecated.
create an empty attribute node given the namespace information.

Specified by:
  `createAttributeNS` in interface `Document`
Parameters:
  `nsURI` - The namespace URI of the attribute to create.
  `qname` - The qualified name of the attribute to instantiate.
Returns:
  an attribute object.
Throws:
  `DOMException` - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.
  NAMESPACE_ERR: Raised if the `qualifiedName` is malformed, if the `qualifiedName` has a prefix and the `namespaceURI` is `null`, if the `qualifiedName` has a prefix that is "xml" and the `namespaceURI` is different from " http://www.w3.org/XML/1998/namespace", or if the `qualifiedName` is "xmlns" and the `namespaceURI` is different from " http://www.w3.org/2000/xmlns/".

#### getElementsByTagNameNS

    public NodeList getElementsByTagNameNS(java.lang.String nsURI,
                                           java.lang.String tagname)

Deprecated.
get elements of the given tagname and ns URI with a pre-order traversal of the document tree.

Specified by:
  `getElementsByTagNameNS` in interface `Document`
Parameters:
  `nsURI` - The namespace URI of the elements to match on. The special value "*" matches all namespaces.
  `tagname` - The local name of the elements to match on. The special value "*" matches all local names.
Returns:
  a Nodelist of the matched items.

#### getElementById

    public Element getElementById(java.lang.String id)

Deprecated.
get elements of the given ID with a pre-order traversal of the document tree.

Specified by:
  `getElementById` in interface `Document`
Parameters:
  `id` - The unique `id` value for an element.
Returns:
  an Element with the matching ID.

#### getNodeName

    public java.lang.String getNodeName()

Deprecated.
get the name of the node

Specified by:
  `getNodeName` in interface `Node`
Overrides:
  `getNodeName` in class `XDBNode`
Returns:
  the node name string, always "#document" for this node.

#### getOwnerDocument

    public Document getOwnerDocument()

Deprecated.
the owner document for this node

Specified by:
  `getOwnerDocument` in interface `Node`
Overrides:
  `getOwnerDocument` in class `XDBNode`
Returns:
  always null for this node

#### insertBefore

    public Node insertBefore(Node newChild,
                             Node refChild)
                      throws DOMException

Deprecated.
insert the given node before the ref node. In this case, if the node already has children this function will throw an exception

Specified by:
  `insertBefore` in interface `Node`
Overrides:
  `insertBefore` in class `XDBNode`
Parameters:
  `newChild` - The node to insert.
  `refChild` - The reference node, i.e., the node before which the new node must be inserted.
Returns:
  The newChild which is to be inserted
Throws:
  `DOMException` - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the `newChild` node, or if the node to insert is one of this node's ancestors.
  WRONG_DOCUMENT_ERR: Raised if `newChild` was created from a different document than the one that created this node.
  NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if the parent of the node being inserted is readonly.
  NOT_FOUND_ERR: Raised if `refChild` is not a child of this node.

#### replaceChild

    public Node replaceChild(Node newChild,
                             Node oldChild)
                      throws DOMException

Deprecated.
replace the oldchild node with the newchild node.

Specified by:
  `replaceChild` in interface `Node`
Overrides:
  `replaceChild` in class `XDBNode`
Parameters:
  `newChild` - The new node to put in the child list.
  `oldChild` - The node being replaced in the list.
Returns:
  The oldChild node which has been replaced
Throws:
  `DOMException` - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the `newChild` node, or if the node to put in is one of this node's ancestors.
  WRONG_DOCUMENT_ERR: Raised if `newChild` was created from a different document than the one that created this node.
  NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of the new node is readonly.
  NOT_FOUND_ERR: Raised if `oldChild` is not a child of this node.

#### removeChild

    public Node removeChild(Node arg)
                     throws DOMException

Deprecated.
remove the given node from the node.

Specified by:
  `removeChild` in interface `Node`
Overrides:
  `removeChild` in class `XDBNode`
Parameters:
  `arg` - The node being removed.
Returns:
  The node which is being removed
Throws:
  `DOMException` - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  NOT_FOUND_ERR: Raised if `oldChild` is not a child of this node.

#### appendChild

    public Node appendChild(Node arg)
                     throws DOMException

Deprecated.
append the given node to the list of children of this node. This will work only if the document has no children

Specified by:
  `appendChild` in interface `Node`
Overrides:
  `appendChild` in class `XDBNode`
Parameters:
  `arg` - The node to add.If it is a `DocumentFragment` object, the entire contents of the document fragment are moved into the child list of this node
Returns:
  The node which is being appended
Throws:
  `DOMException` - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the `newChild` node, or if the node to append is one of this node's ancestors.
  WRONG_DOCUMENT_ERR: Raised if `newChild` was created from a different document than the one that created this node.
  NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

#### getFirstChild

    public Node getFirstChild()

Deprecated.
Description copied from class: `XDBNode`
Returns the first child of the node. must be overriden derived classes which support this

Specified by:
  `getFirstChild` in interface `Node`
Overrides:
  `getFirstChild` in class `XDBNode`
Returns:
  the first child node

#### getLastChild

    public Node getLastChild()

Deprecated.
Description copied from class: `XDBNode`
Returns the last child of the node. must be overriden derived classes which support this

Specified by:
  `getLastChild` in interface `Node`
Overrides:
  `getLastChild` in class `XDBNode`
Returns:
  the last child node

#### getPreviousSibling

    public Node getPreviousSibling()

Deprecated.
Description copied from class: `XDBNode`
Returns the previous sibling of the node. must be overriden derived classes which support this

Specified by:
  `getPreviousSibling` in interface `Node`
Overrides:
  `getPreviousSibling` in class `XDBNode`
Returns:
  the previous node

#### getNextSibling

    public Node getNextSibling()

Deprecated.
Description copied from class: `XDBNode`
Returns the next sibling of the node. must be overriden derived classes which support this

Specified by:
  `getNextSibling` in interface `Node`
Overrides:
  `getNextSibling` in class `XDBNode`
Returns:
  the next node

#### isClosed

    public boolean isClosed()

Deprecated.

#### close

    public void close()

Deprecated.

Overrides:
  `close` in class `XDBNode`

#### finalize

    public void finalize()
                  throws java.lang.Throwable

Deprecated.

Overrides:
  `finalize` in class `XDBNode`
Throws:
  `java.lang.Throwable`

#### getGP

    public static long getGP(java.sql.Connection conn)

Deprecated.

#### renameNode

    public Node renameNode(Node n,
                           java.lang.String namespaceURI,
                           java.lang.String qualifiedName)
                    throws DOMException

Deprecated.

Throws:
  `DOMException`

#### getDomConfig

    public DOMConfiguration getDomConfig()

Deprecated.

#### normalizeDocument

    public void normalizeDocument()

Deprecated.

#### getStrictErrorChecking

    public boolean getStrictErrorChecking()

Deprecated.

#### setStrictErrorChecking

    public void setStrictErrorChecking(boolean strictErrorChecking)

Deprecated.

#### getDocumentURI

    public java.lang.String getDocumentURI()

Deprecated.

#### setDocumentURI

    public void setDocumentURI(java.lang.String documentURI)

Deprecated.

#### adoptNode

    public Node adoptNode(Node source)
                   throws DOMException

Deprecated.

Throws:
  `DOMException`

#### getInputEncoding

    public java.lang.String getInputEncoding()

Deprecated.

#### getXmlEncoding

    public java.lang.String getXmlEncoding()

Deprecated.

#### getXmlStandalone

    public boolean getXmlStandalone()

Deprecated.

#### setXmlStandalone

    public void setXmlStandalone(boolean xmlStandalone)
                          throws DOMException

Deprecated.

Throws:
  `DOMException`

#### getXmlVersion

    public java.lang.String getXmlVersion()

Deprecated.

#### setXmlVersion

    public void setXmlVersion(java.lang.String xmlVersion)
                       throws DOMException

Deprecated.

Throws:
  `DOMException`

Copyright © 2003, 2018, Oracle and/or its affiliates. All rights reserved.