Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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, XDBResource

public class XDBDocument
extends XDBNode
implements Document

Field Summary

Fields inherited from class oracle.xdb.dom.XDBNode
`m_conn, m_owner, m_xobcstate`

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
`XDBDocument()`
`XDBDocument(byte[] source)`
`XDBDocument(java.sql.Connection conn)`
`XDBDocument(java.sql.Connection conn, byte[] source)`
`XDBDocument(java.sql.Connection conn, long xobd)`
`XDBDocument(java.sql.Connection conn, java.lang.String source)`
`XDBDocument(java.lang.String source)`
`XDBDocument(XMLType parxmlt, java.sql.Connection conn, long xobd)`

Method Summary
`Node` | `appendChild(Node arg)` append the given node to the list of children of this node.
`void` | `close()`
`Attr` | `createAttribute(java.lang.String qname)` create an empty attribute node.
`Attr` | `createAttributeNS(java.lang.String nsURI, java.lang.String qname)` create an empty attribute node given the namespace information.
`CDATASection` | `createCDATASection(java.lang.String data)` create a CDATA section node.
`Comment` | `createComment(java.lang.String data)` create a comment node.
`DocumentFragment` | `createDocumentFragment()` create an empty document fragment.
`Element` | `createElement(java.lang.String tagName)` create and Return a new empty element associated with the document.
`Element` | `createElementNS(java.lang.String nsURI, java.lang.String qname)` create and Return a new empty element associated with the document.
`EntityReference` | `createEntityReference(java.lang.String name)` create an entity reference node.
`ProcessingInstruction` | `createProcessingInstruction(java.lang.String target, java.lang.String data)` create a processing instruction node.
`Text` | `createTextNode(java.lang.String data)` create an empty text node.
`void` | `finalize()`
`DocumentType` | `getDoctype()` Returns the document type defn. of the doc.
`Element` | `getDocumentElement()` Returns the root element of the document.
`Element` | `getElementById(java.lang.String id)` get elements of the given ID with a pre-order traversal of the document tree.
`NodeList` | `getElementsByTagName(java.lang.String tagname)` 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)` get elements of the given tagname and ns URI with a pre-order traversal of the document tree.
`static long` | `getEnvNative(long envhandle)`
`Node` | `getFirstChild()` The first child of this node.
`protected static long` | `getGP(java.sql.Connection conn)`
`DOMImplementation` | `getImplementation()` Returns the dom implementation object.
`Node` | `getLastChild()` The last child of this node.
`Node` | `getNextSibling()` The node immediately following this node.
`java.lang.String` | `getNodeName()` get the name of the node
`Document` | `getOwnerDocument()` the owner document for this node
`Node` | `getPreviousSibling()` The node immediately preceding this node.
`boolean` | `hasChildNodes()` does document have child nodes
`Node` | `importNode(Node importNode, boolean deep)` import the given node from the original document based on the rules specified by the DOM specification
`Node` | `insertBefore(Node newChild, Node refChild)` insert the given node before the ref node.
`boolean` | `isClosed()`
`Node` | `removeChild(Node arg)` remove the given node from the node.
`Node` | `replaceChild(Node newChild, Node oldChild)` replace the oldchild node with the newchild node.

Methods inherited from class oracle.xdb.dom.XDBNode
`cloneNode, equals, getAttributes, getChildNodes, getExpandedName, getLocalName, getNamespaceURI, getNodeFromCState, getNodeType, getNodeValue, getParentNode, getPrefix, getQualifiedName, getSchemaNode, hasAttributes, hashCode, isSupported, normalize, setNodeValue, setNodeXob, setOwner, setPrefix, setXobCstate, toCState, toString, write`

Methods inherited from class java.lang.Object
`clone, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.w3c.dom.Node
`cloneNode, getAttributes, getChildNodes, getLocalName, getNamespaceURI, getNodeType, getNodeValue, getParentNode, getPrefix, hasAttributes, isSupported, normalize, setNodeValue, setPrefix`

Constructor Detail

### XDBDocument

    public XDBDocument()

### XDBDocument

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

### XDBDocument

    public XDBDocument(java.lang.String source)

### XDBDocument

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

### XDBDocument

    public XDBDocument(byte[] source)

### XDBDocument

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

### XDBDocument

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

### XDBDocument

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

Method Detail

### getEnvNative

    public static long getEnvNative(long envhandle)

### getDoctype

    public DocumentType getDoctype()

  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()

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

### getDocumentElement

    public Element getDocumentElement()

  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

  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`
  Returns:
    a new XDBElement.
  Throws:
    `DOMException` - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.

### createDocumentFragment

    public DocumentFragment createDocumentFragment()

  create an empty document fragment.
  Specified by:
    `createDocumentFragment` in interface `Document`
  Returns:
    a Document Fragment object.

### createTextNode

    public Text createTextNode(java.lang.String data)

  create an empty text node.
  Specified by:
    `createTextNode` in interface `Document`
  Returns:
    a text node object.

### createComment

    public Comment createComment(java.lang.String data)

  create a comment node. Not implemented yet.
  Specified by:
    `createComment` in interface `Document`
  Returns:
    a comment node object.

### createCDATASection

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

  create a CDATA section node. Not implemented yet.
  Specified by:
    `createCDATASection` in interface `Document`
  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

  create a processing instruction node.
  Specified by:
    `createProcessingInstruction` in interface `Document`
  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

  create an empty attribute node.
  Specified by:
    `createAttribute` in interface `Document`
  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

  create an entity reference node. We do not implement it
  Specified by:
    `createEntityReference` in interface `Document`
  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)

  get elements of the given tagname with a pre-order traversal of the document tree.
  Specified by:
    `getElementsByTagName` in interface `Document`
  Returns:
    a Nodelist of the matched items.

### importNode

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

  import the given node from the original document based on the rules specified by the DOM specification
  Specified by:
    `importNode` in interface `Document`
  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

  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`
  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

  create an empty attribute node given the namespace information.
  Specified by:
    `createAttributeNS` in interface `Document`
  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)

  get elements of the given tagname and ns URI with a pre-order traversal of the document tree.
  Specified by:
    `getElementsByTagNameNS` in interface `Document`
  Returns:
    a Nodelist of the matched items.

### getElementById

    public Element getElementById(java.lang.String id)

  get elements of the given ID with a pre-order traversal of the document tree.
  Specified by:
    `getElementById` in interface `Document`
  Returns:
    an Element with the matching ID.

### getNodeName

    public java.lang.String getNodeName()

  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.

### hasChildNodes

    public boolean hasChildNodes()

  does document have child nodes
  Specified by:
    `hasChildNodes` in interface `Node`
  Overrides:
    `hasChildNodes` in class `XDBNode`
  Returns:
    true if document has children.

### getOwnerDocument

    public Document getOwnerDocument()

  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

  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`
  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

  replace the oldchild node with the newchild node.
  Specified by:
    `replaceChild` in interface `Node`
  Overrides:
    `replaceChild` in class `XDBNode`
  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

  remove the given node from the node.
  Specified by:
    `removeChild` in interface `Node`
  Overrides:
    `removeChild` in class `XDBNode`
  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

  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`
  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()

  Description copied from interface: `Node`
  The first child of this node. If there is no such node, this returns `null`.
  Specified by:
    `getFirstChild` in interface `Node`
  Overrides:
    `getFirstChild` in class `XDBNode`
  Returns:
    the first child node

### getLastChild

    public Node getLastChild()

  Description copied from interface: `Node`
  The last child of this node. If there is no such node, this returns `null`.
  Specified by:
    `getLastChild` in interface `Node`
  Overrides:
    `getLastChild` in class `XDBNode`
  Returns:
    the last child node

### getPreviousSibling

    public Node getPreviousSibling()

  Description copied from interface: `Node`
  The node immediately preceding this node. If there is no such node, this returns `null`.
  Specified by:
    `getPreviousSibling` in interface `Node`
  Overrides:
    `getPreviousSibling` in class `XDBNode`
  Returns:
    the previous node

### getNextSibling

    public Node getNextSibling()

  Description copied from interface: `Node`
  The node immediately following this node. If there is no such node, this returns `null`.
  Specified by:
    `getNextSibling` in interface `Node`
  Overrides:
    `getNextSibling` in class `XDBNode`
  Returns:
    the next node

### isClosed

    public boolean isClosed()

  Overrides:
    `isClosed` in class `XDBNode`

### close

    public void close()

  Overrides:
    `close` in class `XDBNode`

### finalize

    public void finalize()
                  throws java.lang.Throwable

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

### getGP

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

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003, 2004, Oracle. All rights reserved.