Oracle9i XML API Reference - XDK and Oracle XML DB Release 2 (9.2) Part Number A96616-01 |
|
The classes described in this chapter are contained in package oracle.xdb.dom and implement the Java DOM API for XMLType. In addition to implementing the W3C DOM Recommendation, the DOM API for Oracle XML DB provides Oracle-specific extensions. This chapter contains these sections:
Table 21-1 lists each class and the W3C DOM interface it implements.
This class implements org.w3c.dom.Attribute
, the W3C DOM Node interface for interacting with XOB
s.
public class XDBAttribute oracle.xdb.dom.XDBAttribute
This class implements org.w3c.dom.CData
, the W3C text interface.
public class XDBCData oracle.xdb.dom.XDBCData
This class implements org.w3c.dom.CharData
, the W3C CharacterData interface.
public class XDBCharData oracle.xdb.dom.XDBCharData
This class implements the org.w3c.dom.Comment
interface.
public class XDBComment oracle.xdb.dom.XDBComment
This class implements the org.w3c.dom.Document
interface.
public class XDBDocument oracle.xdb.dom.XDBDocument
Class constructor. The options are described in the following table.
Parameter | Description |
---|---|
source |
Contains XML text. |
conn |
Connection to be used. |
This class implements org.w3c.dom.DomImplementation
.
public class XDBDomImplementation oracle.xdb.dom.XDBDomImplementation
Opens a JDBC connection to the server.
public XDBDomImplementation();
This class implements org.w3c.dom.Element
.
public class XDBElement oracle.xdb.dom.XDBElement
This class implements org.w3c.dom.Entity
.
public class XDBEntity oracle.xdb.dom.XDBEntity
This class implements org.w3c.dom.NamedNodeMap
.
public class XDBNamedNodeMap oracle.xdb.dom.XDBNamedNodeMap
public abstract class XDBNode oracle.xdb.dom.XDBNode
This class implements org.w3c.dom.Node
, the W3C DOM Node interface for interacting with XOBs.
Writes the XML for this Node (and all subnodes) to an OutputStream. If the OutputStream is a ServletOutputStream, the servlet output is committed and the data is written using a native stream mechanism.
public void write( OutputStream s, String charEncoding, short indent);
Parameter | Description |
---|---|
s |
The stream to write the output to. Contains XML text. |
charEncoding |
The IANA char code, such as "ISO-8859". |
indent |
Number of chars to indent nested elements. |
This class implements org.w3c.dom.NodeList
.
public class XDBNodeList oracle.xdb.dom.XDBNodeList
This class implements org.w3c.dom.Notation.
public class XDBNotation oracle.xdb.dom.XDBNotation
This class implements org.w3c.dom.ProcInst
, the W3C DOM ProcessingInstruction interface.
public class XDBProcInst oracle.xdb.dom.XDBProcInst
This class implements org.w3c.dom.Text
.
public class XDBText oracle.xdb.dom.XDBText
XMLType implements the Java methods for the sql type SYS.XMLTYPE.
public class XMLType oracle.xdb.XMLType
Creates an XMLType. Throws java.sql.SQLException if the XMLType could not be created. The options are described in the following table.
Returns an input stream which corresponds to the XMLType document. Users can then read the XML data using the InputStream methods.
public InputStream getInputStream();
Retrieves the string value containing the XML data from the XMLType. Throws java.sql.SQLException.
public String getStringVal();
Retrieves the CLOB value containing the XML data from the XMLType. Throws java.sql.SQLException.
public CLOB getClobVal();
Extracts and returns the given set of nodes from the XMLType. This set of nodes is specified by the XPath expression. The original XMLType remains unchanged. Works only in the thick case. If no nodes match the specified expression, returns NULL
. Throws java.sql.SQLException.
public XMLType extract( String xpath, String nsmap);
Checks for the existence of the given set of nodes in the XMLType. This set of nodes is specified by the xpath expression. Returns TRUE
if specified nodes exist in the XMLType; otherwise, returns FALSE
. Throws java.sql.SQLException.
public boolean existsNode( String xpath, String nsmap);
Transforms and returns the XMLType using the given XSL document. The new (transformed) XML document is returned. Throws java.sql.SQLException.
public XMLType transform( XMLType xsldoc, String parammap);
Checks if the XMLType is a regular document or a document fragment. Returns TRUE
if doc is a fragment; otherwise, returns FALSE
. Throws java.sql.SQLException.
public boolean isFragment();
Retrieves the DOM document associated with the XMLType. This document is the org.w3c.dom.Document. The caller can perform all the DOM operations on the Document. If the document is a binary document, the getDOM function will return NULL
. Throws java.sql.SQLException.
public org.w3c.dom.Document getDOM();
Writes the XML data into the specified OutputStream.
public void writeToOutputStream( OutputStream os);
Parameter | Description |
---|---|
os |
Specified Output Stream where data is written. |
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|