The DBMS_XMLDOM
package is used to access XMLType
objects, and implements the Document Object Model (DOM), an application programming interface for HTML and XML documents.
This chapter contains the following topics:
Overview
Security Model
Constants
Types
Exceptions
DOMNode Subprograms
DOMAttr Subprograms
DOMCDataSection Subprograms
DOMCharacterData Subprograms
DOMComment Subprograms
DOMDocument Subprograms
DOMDocumentFragment Subprograms
DOMDocumentType Subprograms
DOMElement Subprograms
DOMEntity Subprograms
DOMEntityReference Subprograms
DOMImplementation Subprograms
DOMNamedNodeMap Subprograms
DOMNodeList Subprograms
DOMNotation Subprograms
DOMProcessingInstruction Subprograms
DOMText Subprograms
The Document Object Model (DOM) is an application programming interface (API) for HTML and XML documents. It defines the logical structure of documents, and the manner in which they are accessed and manipulated. In the DOM specification, the term "document" is used in the broad sense. XML is being increasingly used to represent many different kinds of information that may be stored in diverse systems. This information has been traditionally be seen as "data"; nevertheless, XML presents this data as documents, and the DBMS_XMLDOM
package allows you access to both schema-based and non schema-based documents.
Note:
Before database startup, the read-from and write-to directories in the init.ORA
file must be specified; for example: UTL_FILE_DIR=/mypath/insidemypath
.
Read-from and write-to files must be on the server file system.
With DOM, anything found in an HTML or XML document can be accessed, changed, deleted, or added using the Document Object Model, with a few exceptions. In particular, the DOM interfaces for the XML internal and external subsets have not yet been specified.
One important objective of the W3C DOM specification is to provide a standard programming interface that can be used in a wide variety of environments, programming languages, and applications. Because the DOM standard is object-oriented while PL/SQL is essentially a procedural language, some changes had to be made:
Various DOM interfaces such as Node
, Element
, and others have equivalent PL/SQL types DOMNode
, DOMElement
, respectively.
Various DOMException
codes such as WRONG_DOCUMENT_ERR
, HIERARCHY_REQUEST_ERR
, and others, have similarly named PL/SQL exceptions.
Various DOM Node type codes such as ELEMENT_NODE
, ATTRIBUTE_NODE
, and others, have similarly named PL/SQL constants.
Subprograms defined on a DOM type become functions or procedures that accept it as a parameter. For example, to perform APPENDCHILD Function on a DOMNode
n
, the APPENDCHILD FunctionPL/SQL function is provided.
To perform setAttribute
on a DOMElement elem
SETATTRIBUTE Procedures, use PL/SQL procedure .
DOM defines an inheritance hierarchy. For example, Document
, Element
, and Attr
are defined to be subtypes of Node
(see Figure 171-1). Thus, a method defined in the Node
interface should be available in these as well. Since such inheritance is not supported in PL/SQL, it is implemented through direct invocation of the MAKENODE
function. Calling MAKENODE
on various DOM types converts these types into a DOMNode
. The appropriate functions or procedures that accept DOMNode
s can then be called to operate on these types. If, subsequently, type specific functionality is desired, the DOMNode
can be converted back into the original type by the make
XXX
functions, where DOM
XXX
is the desired DOM type.
Figure 171-1 Inheritance Diagram for DOM Types
The implementation of this interface follows the REC-DOM-Level-1-19981001.
Owned by XDB
, the DBMS_XMLDOM
package must be created by SYS
or XDB
. The EXECUTE
privilege is granted to PUBLIC
. Subprograms in this package are executed using the privileges of the current user.
Defined constants of DBMS_XMLDOM
are listed in Table 171-1.
Table 171-1 Defined Constants for DBMS_XMLDOM
Constant | Type | Value | Description |
---|---|---|---|
|
|
1 |
The Node is an Element. |
|
|
2 |
The Node is an Attribute. |
|
|
3 |
The Node is a Text node. |
|
|
4 |
The Node is a CDataSection. |
|
|
5 |
The Node is an Entity Reference. |
|
|
6 |
The Node is an Entity. |
|
|
7 |
The Node is a Processing Instruction. |
|
|
8 |
The Node is a Comment. |
|
|
9 |
The Node is a Document. |
|
|
10 |
The Node is a Document Type Definition. |
|
|
11 |
The Node is a Document fragment. |
|
|
12 |
The Node is a Notation. |
The following types for DBMS_XMLDOM.DOMTYPE
are defined in Table 171-2:
Type | Description |
---|---|
|
Implements the DOM Attribute interface. |
|
Implements the DOM CDataSection interface. |
|
Implements the DOM Character Data interface. |
|
Implements the DOM Comment interface. |
|
Implements the DOM Document interface. |
|
Implements the DOM DocumentFragment interface. |
|
Implements the DOM Document Type interface. |
|
Implements the DOM Element interface. |
|
Implements the DOM Entity interface. |
|
Implements the DOM EntityReference interface. |
|
Implements the DOM Implementation interface. |
|
Implements the DOM Named Node Map interface. |
|
Implements the DOM Node interface. |
|
Implements the DOM NodeList interface. |
|
Implements the DOM Notation interface. |
|
Implements the DOM Processing instruction interface. |
|
Implements the DOM Text interface. |
The exceptions listed in Table 171-3 are defined for DBMS_XMLDOM
:
Table 171-3 Exceptions for DBMS_XMLDOM
Exception | Description |
---|---|
|
If the specified range of text does not fit into a |
|
If any node is inserted somewhere it doesn't belong. |
|
If index or size is negative, or greater than the allowed value. |
|
If an attempt is made to add an attribute that is already in use elsewhere. |
|
If an invalid or illegal character is specified, such as in a name. See production 2 in the XML specification for the definition of a legal character, and production 5 for the definition of a legal name character. |
|
If data is specified for a node that does not support data. |
|
If an attempt is made to reference a node in a context where it does not exist. |
|
If an attempt is made to modify an object where modifications are not allowed. |
|
If the implementation does not support the requested type of object or operation. |
|
If a node is used in a different document than the one that created it (that doesn't support it). |
DBMS_XMLDOM
subprograms are divided into groups according to W3C Interfaces.
Table 171-4 Summary of DOMNode Subprograms; DBMS_XMLDOM
Subprogram | Description |
---|---|
Adopts a node from another document |
|
Appends a new child to the node |
|
Clones the node |
|
Frees all resources associated with the node |
|
Retrieves the attributes of the node |
|
Retrieves the children of the node |
|
Retrieves the expanded name of the node |
|
Retrieves the first child of the node |
|
Retrieves the last child of the node |
|
Retrieves the local part of the qualified name |
|
Retrieves the node's namespace URI |
|
Retrieves the next sibling of the node |
|
Retrieves the Name of the Node |
|
Retrieves the Type of the node |
|
Retrieves the Value of the Node |
|
Retrieves Node Value as binary stream |
|
Retrieves Node Value as character stream |
|
Retrieves the owner document of the node |
|
Retrieves the parent of this node |
|
Retrieves the namespace prefix |
|
Retrieves the previous sibling of the node |
|
Retrieves the associated schema URI |
|
Tests if the node has attributes |
|
Tests if the node has child nodes |
|
Imports a node from another document |
|
Inserts a child before the reference child |
|
Tests if the node is |
|
Casts the node to an Attribute |
|
Casts the node to a CData Section |
|
Casts the node to Character Data |
|
Casts the node to a Comment |
|
Casts the node to a DOM Document |
|
Casts the node to a DOM Document Fragment |
|
Casts the node to a DOM Document Type |
|
Casts the node to a DOM Element |
|
Casts the node to a DOM Entity |
|
Casts the node to a DOM Entity Reference |
|
Casts the node to a DOM Notation |
|
Casts the node to a DOM Processing Instruction |
|
Casts the node to a DOM Text |
|
Removes a specified child from a node |
|
Replaces the old child with a new child |
|
Sets the Value of the node |
|
Sets the Node Value as binary stream |
|
Sets the Node Value as a character stream |
|
Sets the namespace prefix |
|
Establishes that the stream is valid |
|
Writes the contents of the node to a buffer |
|
Writes the contents of the node to a |
|
Writes the contents of the node to a file |
Table 171-5 Summary of DOMAttr Subprograms; DBMS_XMLDOM
Method | Description |
---|---|
Retrieves the expanded name of the attribute |
|
Retrieves the local name of the attribute |
|
Retrieves the name of the attribute |
|
Retrieves the NS URI of the attribute |
|
Retrieves the Element node, parent of the attribute |
|
Retrieves the Qualified Name of the attribute |
|
Tests if attribute was specified in the element |
|
Retrieves the value of the attribute |
|
Tests if the Attribute node is |
|
Casts the Attribute to a node |
|
Sets the value of the attribute |
Table 171-7 Summary of DOMCharacterData Subprograms; DBMS_XMLDOM
Method | Description |
---|---|
Appends the specified data to the node data |
|
Deletes the data from the specified offSets |
|
Retrieves the data of the node |
|
Retrieves the length of the data |
|
Inserts the data in the node at the specified offSets |
|
Tests if the CharacterData is |
|
Casts the CharacterData to a node |
|
Changes a range of characters in the node |
|
Sets the data to the node |
|
Retrieves the substring of the data |
Table 171-9 Summary of DOMDocument Subprograms; DBMS_XMLDOM
Method | Description |
---|---|
Creates an Attribute |
|
Creates a |
|
Creates a Comment node |
|
Creates a new Document |
|
Creates a new Document Fragment |
|
Creates a new Element |
|
Creates an Entity reference |
|
Creates a Processing Instruction |
|
Creates a Text node |
|
Frees the document fragment |
|
Frees the document |
|
Retrieves the characterset of the |
|
Retrieves the DTD of the document |
|
Retrieves the root element of the document |
|
Retrieves
|
|
Retrieves the DOM implementation |
|
Retrieves the standalone property of the document |
|
Retrieves the version of the document |
|
Retrieves the |
|
Tests if the document is |
|
Casts the document to a node |
|
Creates a new document |
|
Sets the characterset of the |
|
Sets the DTD of the document |
|
Sets the standalone property of the document |
|
Sets the version of the document |
|
Writes the document to a buffer |
|
Writes the document to a |
|
Writes the document to a file |
Table 171-11 Summary of DOMDocumentType Subprograms; DBMS_XMLDOM
Method | Description |
---|---|
Finds the specified entity in the document type |
|
Finds the specified notation in the document type |
|
Retrieves the nodemap of entities in the Document type |
|
Retrieves the name of the Document type |
|
Retrieves the nodemap of the notations in the Document type |
|
Retrieves the public ID of the document type |
|
Retrieves the system ID of the document type |
|
Tests if the Document Type is |
|
Casts the document type to a node |
Table 171-12 Summary of DOMElement Subprograms; DBMS_XMLDOM
Method | Description |
---|---|
Frees memory allocated to a DOMElement handle |
|
Retrieves the attribute node by name |
|
Retrieves the attribute node by name |
|
Retrieves children of the element by tag name |
|
Retrieves
|
|
Retrieves the expanded name of the element |
|
Retrieves the local name of the element |
|
Retrieves the NS URI of the element |
|
Retrieves the qualified name of the element |
|
Retrieves the Tag name of the element |
|
Tests if an attribute exists |
|
Tests if the Element is |
|
Casts the Element to a node |
|
Normalizes the text children of the element |
|
Removes the attribute specified by the name |
|
Removes the attribute node in the element |
|
Resolve the prefix to a namespace URI |
|
Sets the attribute specified by the name |
|
Sets the attribute node in the element |
Table 171-16 Summary of DOMNamedNodeMap Subprograms; DBMS_XMLDOM
Method | Description |
---|---|
Retrieves the number of items in the map |
|
Retrieves the item specified by the name |
|
Tests if the |
|
Retrieves the item given the index in the map |
|
Removes the item specified by name |
|
Sets the item in the map specified by the name |
Table 171-19 Summary of DOMProcessingInstruction Subprograms; DBMS_XMLDOM
Method | Description |
---|---|
Retrieves the data of the processing instruction |
|
Retrieves the target of the processing instruction |
|
Tests if the Processing Instruction is |
|
Casts the Processing Instruction to a node |
|
Sets the data of the processing instruction |
Table 171-21 Summary of DBMS_XMLDOM Package Subprogram
Subprogram | Description | Group |
---|---|---|
Adopts a node from another document |
||
Appends a new child to the node |
||
Appends the specified data to the node data |
||
Clones the node |
||
Creates an Attribute |
||
Creates a |
||
Creates a Comment node |
||
Creates a new Document |
||
Creates a new Document Fragment |
||
Creates a new Element |
||
Creates an Entity reference |
||
Creates a Processing Instruction |
||
Creates a Text node |
||
Deletes the data from the specified offSets |
||
Finds the specified entity in the document type |
||
Finds the specified notation in the document type |
||
Frees the document fragment |
||
Frees the document |
||
Frees memory allocated to a DOMElement handle |
||
Frees all resources associated with the node |
||
Frees all resources associated with a nodelist |
||
Retrieves the attribute node by name |
||
Retrieves the attribute node by name |
||
Retrieves the attributes of the node |
||
Retrieves the characterset of the |
||
Retrieves the children of the node |
||
Retrieves children of the element by tag name |
||
Retrieves
|
||
Retrieves the DTD of the document |
||
Retrieves the root element of the document |
||
Retrieves
|
||
Retrieves the nodemap of entities in the Document type |
||
Retrieves
|
||
Retrieves the first child of the node |
||
Retrieves the DOM implementation |
||
Retrieves the last child of the node |
||
Retrieves
|
||
Retrieves
|
||
Retrieves
|
||
Retrieves
|
||
Retrieves
|
||
Retrieves the next sibling of the node |
||
Retrieves the Name of the Node |
||
Retrieves the Type of the node |
||
Retrieves the Value of the Node |
||
Retrieves the Node Value as binary stream |
||
Retrieves the Node Value as character stream |
||
Retrieves the notation name of the entity |
||
Retrieves the nodemap of the notations in the Document type |
||
Retrieves the target of the processing instruction |
||
Retrieves the owner document of the node |
||
Retrieves the Element node, parent of the attribute |
||
Retrieves the parent of this node |
||
Retrieves the namespace prefix ) |
||
Retrieves the previous sibling of the node |
||
Retrieves
|
||
Retrieves
|
||
Retrieves the associated schema URI |
||
Tests if attribute was specified in the element. |
||
Retrieves the standalone property of the document |
||
Retrieves
|
||
Retrieves the Tag name of the element |
||
Retrieves the value of the attribute |
||
Retrieves the version of the document |
||
Retrieves the |
||
Tests if the node has attributes |
||
Tests if an attribute exists |
||
Tests if the node has child nodes |
||
Tests if the |
||
Imports a node from another document |
||
Inserts a child before the reference child |
||
Inserts the data in the node at the specified offSets |
||
Tests
|
|
|
Retrieves
|
||
Casts the node to an Attribute |
||
Casts the node to a CData Section |
||
Casts the node to Character Data |
||
Casts the node to a Comment |
||
Casts the node to a DOM Document |
||
Casts the node to a DOM Document Fragment |
||
Casts the node to a DOM Document Type |
||
Casts the node to a DOM ElemenT |
||
Casts the node to a DOM Entity |
||
Casts the node to a DOM Entity Reference |
||
Casts
|
|
|
Casts the node to a DOM Notation |
||
Casts the node to a DOM Processing Instruction |
||
Casts the node to a DOM Text |
||
Creates a new document |
||
Normalizes the text children of the element |
||
Removes the attribute specified by the name |
||
Removes the attribute node in the element |
||
Removes a specified child from a node |
||
Removes the item specified by name |
||
Replaces the old child with a new child |
||
Changes a range of characters in the node |
||
Resolve the prefix to a namespace URI |
||
Sets the attribute specified by the name |
||
Sets the attribute node in the element |
||
Sets the characterset of the |
||
Sets
|
||
Sets the DTD of the document. |
||
Sets the item in the map specified by the name |
||
Sets the Value of the node |
||
Sets the Node Value as a binary stream |
||
Sets the Node Value as a character stream |
||
Sets the namespace prefix |
||
Sets the standalone property of the document |
||
Sets the value of the attribute |
||
Sets the version of the document |
||
Splits the contents of the text node into 2 text nodes |
||
Retrieves the substring of the data |
||
Strabismus that the stream is valid for use |
||
Writes
|
||
Writes
|
||
Writes
|
This function adopts a node from another document, and returns this new node.
See Also:
DOMNode Subprograms for other subprograms in this groupNote that the ADOPTNODE Function removes the node from the source document while the IMPORTNODE Function clones the node in the source document.
This function adds the node newchild
to the end of the list of children of this node, and returns the newly added node. If the newchild
is already in the tree, it is first removed.
See Also:
DOMNode SubprogramsThis procedure appends the string to the end of the character data of the node. Upon success, data provides access to the concatenation of data and the specified string argument.
See Also:
DOMCharacterData SubprogramsThis function returns a duplicate of this node, and serves as a generic copy constructor for nodes. The duplicate node has no parent, its parent node is NULL
.
See Also:
DOMNode SubprogramsCloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node.
Cloning an Attribute directly, as opposed to be cloned as part of an Element cloning operation, returns a specified attribute (specified is TRUE
).
Cloning any other type of node simply returns a copy of this node.
This function creates a DOMATTR
node.
See Also:
DOMDocument SubprogramsCreates a DOMATTR
with the specified name:
DBMS_XMLDOM.CREATEATTRIBUTE( doc IN DOMDOCUMENT, name IN VARCHAR2) RETURN DOMATTR;
Creates a DOMATTR
with the specified name and namespace URI:
DBMS_XMLDOM.CREATEATTRIBUTE( doc IN DOMDOCUMENT, qname IN VARCHAR2, ns IN VARCHAR2) RETURN DOMATTR;
This function creates a DOMCDATASECTION
node.
See Also:
DOMDocument SubprogramsDBMS_XMLDOM.CREATECDATASECTION( doc IN DOMDOCUMENT, data IN VARCHAR2) RETURN DOMCDATASECTION;
This function creates a DOMDOCUMENT
with specified namespace URI, root element name, DTD.
See Also:
DOMDocument SubprogramsDBMS_XMLDOM.CREATEDOCUMENT( namespaceURI IN VARCHAR2, qualifiedName IN VARCHAR2, doctype IN DOMTYPE := NULL) RETURN DOMDOCUMENT;
This function creates a DOMDOCUMENTFRAGMENT
.
See Also:
DOMDocument SubprogramsThis function creates a DOMELEMENT
.
See Also:
DOMDocument SubprogramsCreates a DOMElement
with specified name:
DBMS_XMLDOM.CREATEELEMENT( doc IN DOMDOCUMENT, tagName IN VARCHAR2) RETURN DOMELEMENT;
Creates a DOMElement
with specified name and namespace URI:
DBMS_XMLDOM.CREATEELEMENT( doc IN DOMDOCUMENT, tagName IN VARCHAR2, ns IN VARCHAR2) RETURN DOMELEMENT;
This function creates a DOMENTITYREFERENCE
node.
See Also:
DOMDocument SubprogramsDBMS_XMLDOM.CREATEENTITYREFERENCE( doc IN DOMDOCUMENT, name IN VARCHAR2) RETURN DOMENTITYREFERENCE;
This function creates a DOMPROCESSINGINSTRUCTION
node.
See Also:
DOMDocument SubprogramsDBMS_XMLDOM.CREATEPROCESSINGINSTRUCTION( doc IN DOMDocument, target IN VARCHAR2, data IN VARCHAR2) RETURN DOMPROCESSINGINSTRUCTION;
This procedure removes a range of characters from the node. Upon success, data and length reflect the change.
See Also:
DOMCharacterData SubprogramsThis function finds an entity in the specified DTD, and returns that entity if found.
See Also:
DOMDocumentType SubprogramsDBMS_XMLDOM.FINDENTITY( dt IN DOMDOCUMENTTYPE, name IN VARCHAR2, par IN BOOLEAN) RETURN DOMENTITY;
This function finds the notation in the specified DTD, and returns it, if found.
See Also:
DOMDocumentType SubprogramsThis procedure frees memory allocated to a DOMElement handle.
See Also:
DOMElement SubprogramsThis procedure frees all resources associated with a DOMNODE
.
See Also:
DOMNode SubprogramsThis procedure frees all resources associated with a nodelist.
See Also:
DOMNodeList SubprogramsThis function returns the value of an attribute of an DOMELEMENT
by name.
See Also:
DOMElement SubprogramsReturns the value of a DOMELEMENT
's attribute by name:
DBMS_XMLDOM.GETATTRIBUTE( elem IN DOMELEMENT, name IN VARCHAR2) RETURN VARCHAR2;
Returns the value of a DOMELEMENT
's attribute by name and namespace URI:
DBMS_XMLDOM.GETATTRIBUTE( elem IN DOMELEMENT, name IN VARCHAR2, ns IN VARCHAR2) RETURN VARCHAR2;
This function returns an attribute node from the DOMELEMENT
by name. The function is overloaded. The specific forms of functionality are described along with the syntax declarations.
See Also:
DOMElement SubprogramsReturns an attribute node from the DOMELEMENT
by name:
DBMS_XMLDOM.GETATTRIBUTENODE( elem IN DOMElement, name IN VARCHAR2) RETURN DOMATTR;
Returns an attribute node from the DOMELEMENT
by name and namespace URI:
DBMS_XMLDOM.GETATTRIBUTENODE( elem IN DOMElement, name IN VARCHAR2, ns IN VARCHAR2) RETURN DOMATTR;
This function retrieves a NAMEDNODEMAP
containing the attributes of this node (if it is an Element) or NULL
otherwise.
See Also:
DOMNode SubprogramsThis function retrieves the characterset of the DOM document.
See Also:
DOMDocument SubprogramsThis function retrieves a DOMNODELIST
that contains all children of this node. If there are no children, this is a DOMNODELIST
containing no nodes.
See Also:
DOMNode SubprogramsThis function returns the children of the DOMELEMENT
.
See Also:
DOMElement SubprogramsReturns children of the DOMELEMENT
given the tag name:
DBMS_XMLDOM.GETCHILDRENBYTAGNAME( elem IN DOMElement, name IN VARCHAR2) RETURN DOMNODELIST;
Returns children of the DOMELEMENT
given the tag name and namespace:
DBMS_XMLDOM.GETCHILDRENBYTAGNAME( elem IN DOMElement, name IN VARCHAR2, ns IN VARCHAR2) RETURN DOMNODELIST;
This function is overloaded. The specific forms of functionality are described along with the syntax declarations.
Gets the character data of the node that implements this interface (See Also: DOMCharacterData Subprograms):
DBMS_XMLDOM.GETDATA( cd IN DOMCHARACTERDATA) RETURN VARCHAR2;
Returns the content data of the DOMProcessingInstruction
(See Also: DOMProcessingInstruction Subprograms):
DBMS_XMLDOM.GETDATA( pi IN DOMPROCESSINGINSTRUCTION) RETURN VARCHAR2;
This function returns the DTD associated to the DOMDOCUMENT
.
See Also:
DOMDocument SubprogramsThis function returns the root element of the DOMDOCUMENT
.
See Also:
DOMDocument SubprogramsThis function is overloaded. The specific forms of functionality are described along with the syntax declarations.
Returns a DOMNODELIST
of all the elements with a specified tagname (See Also: DOMDocument Subprograms):
DBMS_XMLDOM.GETELEMENTSBYTAGNAME( doc IN DOMDOCUMENT, tagname IN VARCHAR2) RETURN DOMNODELIST;
Returns the element children of the DOMELEMENT
given the tag name (See Also: DOMElement Subprograms):
DBMS_XMLDOM.GETELEMENTSBYTAGNAME( elem IN DOMELEMENT, name IN VARCHAR2) RETURN DOMNODELIST;
Returns the element children of the DOMELEMENT
given the tag name and namespace (See Also: DOMElement Subprograms):
DBMS_XMLDOM.GETELEMENTSBYTAGNAME( elem IN DOMELEMENT, name IN VARCHAR2, ns IN VARCHAR2) RETURN DOMNODELIST;
This function retrieves a DOMNAMEDNODEMAP
containing the general entities, both external and internal, declared in the DTD.
See Also:
DOMDocumentType SubprogramsThis subprogram is overloaded as a procedure and two functions. The specific forms of functionality are described along with the syntax declarations.
Retrieves the expanded name of the Node
if is in an Element
or Attribute
type; otherwise, returns NULL
(See Also: DOMNode Subprograms)
DBMS_XMLDOM.GETEXPANDEDNAME( n IN DOMNODE data OUT VARCHAR);
Returns the expanded name of the DOMAttr
(See Also: DOMAttr Subprograms):
DBMS_XMLDOM.GETEXPANDEDNAME( a IN DOMAttr) RETURN VARCHAR2;
Returns the expanded name of the DOMElement
(See Also: DOMElement Subprograms):
DBMS_XMLDOM.GETEXPANDEDNAME( elem IN DOMELEMENT) RETURN VARCHAR2;
This function retrieves the first child of this node. If there is no such node, this returns NULL
.
See Also:
DOMNode SubprogramsThis function returns the DOMIMPLEMENTATION
object that handles this DOMDOCUMENT
.
See Also:
DOMDocument SubprogramsThis function retrieves the last child of this node. If there is no such node, this returns NULL
.
See Also:
DOMNode SubprogramsThis function is overloaded. The specific forms of functionality are described along with the syntax declarations.
Gets the number of characters in the data. This may have the value zero, because CharacterData nodes may be empty (See Also: DOMCharacterData Subprograms):
DBMS_XMLDOM.GETLENGTH( cd IN DOMCHARACTERDATA) RETURN NUMBER;
Gets the number of nodes in this map. The range of valid child node indexes is 0
to length-1
, inclusive (See Also: DOMNamedNodeMap Subprograms):
DBMS_XMLDOM.GETLENGTH( nnm IN DOMNAMEDNODEMAP) RETURN NUMBER;
Gets the number of nodes in the list. The range of valid child node indexes is 0
to length-1
, inclusive (See Also: DOMNodeList Subprograms):
DBMS_XMLDOM.GETLENGTH( nl IN DOMNODELIST) RETURN NUMBER;
This function is overloaded as a procedure and two functions. The specific forms of functionality are described alongside the syntax declarations.
Retrieves the local part of the node's qualified name (See Also: DOMNode Subprograms):
DBMS_XMLDOM.GETLOCALNAME( n IN DOMNODE, data OUT VARCHAR2);
Returns the local name of the DOMAttr
(See Also: DOMAttr Subprograms):
DBMS_XMLDOM.GETLOCALNAME( a IN DOMATTR) RETURN VARCHAR2;
Returns the local name of the DOMElement
(See Also: DOMElement Subprograms)
DBMS_XMLDOM.GETLOCALNAME( elem IN DOMELEMENT) RETURN VARCHAR2;
This function is overloaded. The specific forms of functionality are described alongside the syntax declarations.
Returns the name of this attribute (See Also: DOMAttr Subprograms):
DBMS_XMLDOM.GETNAME( a IN DOMATTR) RETURN VARCHAR2;
Retrieves the name of DTD, or the name immediately following the DOCTYPE
keyword (See Also: DOMDocumentType Subprograms):
DBMS_XMLDOM.GETNAME( dt IN DOMDOCUMENTTYPE) RETURN VARCHAR2;
This function retrieves a node specified by name.
See Also:
DOMNamedNodeMap SubprogramsRetrieves a node specified by name:
DBMS_XMLDOM.GETNAMEDITEM( nnm IN DOMNAMEDNODEMAP, name IN VARCHAR2) RETURN DOMNODE;
Retrieves a node specified by name and namespace URI:
DBMS_XMLDOM.GETNAMEDITEM( nnm IN DOMNAMEDNODEMAP, name IN VARCHAR2, ns IN VARCHAR2) RETURN DOMNODE;
This subprogram is overloaded as a procedure and two functions. The specific forms of functionality are described alongside the syntax declarations.
Retrieves the namespace URI associated with the node (See Also: DOMNode Subprograms):
DBMS_XMLDOM.GETNAMESPACE( n IN DOMNODE, data OUT VARCHAR2);
Retrieves the namespace of the DOMATTR
(See Also: DOMAttr Subprograms):
DBMS_XMLDOM.GETNAMESPACE( a IN DOMATTR) RETURN VARCHAR2;
Retrieves the namespace of the DOMELEMENT
(See Also: DOMElement Subprograms):
DBMS_XMLDOM.GETNAMESPACE( elem IN DOMELEMENT) RETURN VARCHAR2;
This function retrieves the node immediately following this node. If there is no such node, this returns NULL
.
See Also:
DOMNode SubprogramsThis function retrieves a code representing the type of the underlying object.
See Also:
DOMNode SubprogramsThis function gets the name of the node depending on its type.
See Also:
DOMNode SubprogramsThis function gets the value of this node, depending on its type.
See Also:
DOMNode SubprogramsThe operation of these subprograms is described with each syntax implementation.
See Also:
DOMNode SubprogramsThis function returns an instance of the PL/SQL XMLBinaryInputStream
. The node data type must be RAW
or BLOB
– if not an exception is raised.
DBMS_XMLDOM.GETNODEVALUEASBINARYSTREAM ( n IN DOMNODE) RETURN SYS.UTL_BINARYINPUTSTREAM;
Using this procedure, the application passes an implementation of SYS
.UTL_BINARYOUTPUTSTREAM
into which XDB writes the contents of the node. The data type of the node must be RAW
or CLOB
– if not an exception is raised.
DBMS_XMLDOM.GETNODEVALUEASBINARYSTREAM ( n in DOMNODE, value in SYS.UTL_BINARYOUTPUTSTREAM);
The operation of these subprograms is described with each syntax implementation.
See Also:
DOMNode SubprogramsThis function returns an instance of the PL/SQL XMLCharacterInputStream
. If the node data is character it is converted to the current session character set. If the node data is not character data, it is first converted to character data.
DBMS_XMLDOM.GETNODEVALUEASCHARACTERSTREAM ( n IN DOMNODE) RETURN SYS.UTL_CHARACTERINPUTSTREAM;
Using this procedure, the node data is converted, as necessary, to the session character set and then "pushed" into the SYS
.UTL_CHARACTEROUTPUTSTREAM
.
DBMS_XMLDOM.GETNODEVALUEASCHARACTERSTREAM ( n IN DOMNODE, value IN SYS.UTL_CHARACTEROUTPUTSTREAM);
This function returns the notation name of the DOMENTITY
.
See Also:
DOMEntity SubprogramsThis function retrieves a DOMNAMEDNODEMAP
containing the notations declared in the DTD.
See Also:
DOMDocumentType SubprogramsThis function returns the target of the DOMPROCESSINGINSTRUCTION
.
See Also:
DOMProcessingInstruction SubprogramsThis function retrieves the Document object associated with this node. This is also the Document object used to create new nodes. When this node is a Document or a Document Type that is not used with any Document yet, this is NULL
.
See Also:
DOMNode SubprogramsThis function retrieves the Element node to which the specified Attribute is attached.
See Also:
DOMAttr SubprogramsThis function retrieves the parent of this node. All nodes, except Attr
, Document
, DocumentFragment
, Entity
, and Notation
may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is NULL
.
See Also:
DOMNode SubprogramsThis function retrieves the namespace prefix of the node.
See Also:
DOMNode SubprogramsThis function retrieves the node immediately preceding this node. If there is no such node, this returns NULL
.
See Also:
DOMNode SubprogramsThis function is overloaded. The specific forms of functionality are described along with the syntax declarations.
Returns the public identifier of the specified DTD (See Also: DOMDocumentType Subprograms):
DBMS_XMLDOM.GETPUBLICID( dt IN DOMDOCUMENTTYPE) RETURN VARCHAR2;
Returns the public identifier of the DOMENTITY
(See Also: DOMEntity Subprograms):
DBMS_XMLDOM.GETPUBLICID( ent IN DOMENTITY) RETURN VARCHAR2;
Returns the public identifier of the DOMNOTATION
(See Also: DOMNotation Subprograms):
DBMS_XMLDOM.GETPUBLICID( n IN DOMNOTATION) RETURN VARCHAR2;
This function is overloaded. The specific forms of functionality are described along with the syntax declarations.
Returns the qualified name of the DOMATTR
(See Also: DOMAttr Subprograms):
DBMS_XMLDOM.GETQUALIFIEDNAME( a IN DOMATTR) RETURN VARCHAR2;
Returns the qualified name of the DOMElement
(See Also: DOMElement Subprograms):
DBMS_XMLDOM.GETQUALIFIEDNAME( elem IN DOMELEMENT) RETURN VARCHAR2;
This function retrieves the schema URI associated with the node.
See Also:
DOMNode SubprogramsIf this attribute was explicitly specified, a value in the original document, this is true; otherwise, it is false.
See Also:
DOMAttr SubprogramsThis function returns the standalone property associated with the DOMDOCUMENT
.
See Also:
DOMDocument SubprogramsThis function is overloaded. The specific forms of functionality are described along with the syntax declarations.
Returns the system id of the specified DTD (See Also: DOMDocumentType Subprograms):
DBMS_XMLDOM.GETSYSTEMID( dt IN DOMDOCUMENTTYPE) RETURN VARCHAR2;
Returns the system identifier of the DOMENTITY
(See Also: DOMEntity Subprograms):
DBMS_XMLDOM.GETSYSTEMID( ent IN DOMENTITY) RETURN VARCHAR2;
Returns the system identifier of the DOMNOTATION
(See Also: DOMNotation Subprograms):
DBMS_XMLDOM.GETSYSTEMID( n IN DOMNOTATION) RETURN VARCHAR2;
This function returns the name of the DOMELEMENT
.
See Also:
DOMElement SubprogramsThis function returns the version of the DOMDOCUMENT
.
See Also:
DOMDocument SubprogramsThis function returns the XMLType
associated with the DOMDOCUMENT
.
See Also:
DOMDocument SubprogramsVerifies whether an attribute has been defined for DOMELEMENT
, or has a default value.
See Also:
DOMElement SubprogramsVerifies whether an attribute with the specified name has been defined for DOMElement
:
DBMS_XMLDOM.HASATTRIBUTE( elem IN DOMELEMENT, name IN VARCHAR2) RETURN VARCHAR2;
Verifies whether an attribute with specified name and namespace URI has been defined for DOMELEMENT
; namespace enabled:
DBMS_XMLDOM.HASATTRIBUTE( elem IN DOMELEMENT, name IN VARCHAR2, ns IN VARCHAR2) RETURN VARCHAR2;
This function returns whether this node has any attributes.
See Also:
DOMNode SubprogramsThis function determines whether this node has any children.
See Also:
DOMNode SubprogramsThis function tests if the DOMIMPLEMENTATION
implements a specific feature.
See Also:
DOMImplementation SubprogramsDBMS_XMLDOM.HASFEATURE( di IN DOMIMPLEMENTATION, feature IN VARCHAR2, version IN VARCHAR2) RETURN BOOLEAN;
This function imports a node from an external document and returns this new node.
See Also:
DOMNode SubprogramsDBMS_XMLDOM.IMPORTNODE( doc IN DOMDOCUMENT, importedNode IN DOMNODE, deep IN BOOLEAN) RETURN DOMNODE;
Table 171-91 IMPORTNODE Function Parameters
Parameter | Description |
---|---|
|
Document from which the node is imported |
|
Node to import |
|
Setting for recursive import.
|
Note that the ADOPTNODE Function removes the node from the source document while the IMPORTNODE Function clones the node in the source document.
This function inserts the node newchild
before the existing child node refchild
. If refchild
is NULL
, insert newchild
at the end of the list of children.
If newchild
is a DOCUMENTFRAGMENT
object, all of its children are inserted, in the same order, before refchild
. If the newchild
is already in the tree, it is first removed.
See Also:
DOMNode SubprogramsDBMS_XMLDOM.INSERTBEFORE( n IN DOMNODE, newchild IN DOMNODE, refchild IN DOMNODE) RETURN DOMNode;
This procedure inserts a string at the specified character offset.
See Also:
DOMCharacterData SubprogramsThis function is overloaded. The specific forms of functionality are described along with the syntax declarations.
Checks if the specified DOMNODE
is NULL
. Returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMNode Subprograms):
DBMS_XMLDOM.ISNULL( n IN DOMNODE) RETURN BOOLEAN;
Checks that the specified DOMATTR
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMAttr Subprograms):
DBMS_XMLDOM.ISNULL( a IN DOMATTR) RETURN BOOLEAN;
Checks that the specified DOMCDATASECTION
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMCDataSection Subprograms):
DBMS_XMLDOM.ISNULL( cds IN DOMCDATASECTION) RETURN BOOLEAN;
Checks that the specified DOMCHARACTERDATA
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMCharacterData Subprograms):
DBMS_XMLDOM.ISNULL( cd IN DOMCHARACTERDATA) RETURN BOOLEAN;
Checks that the specified DOMCOMMENT
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMComment Subprograms):
DBMS_XMLDOM.ISNULL( com IN DOMCOMMENT) RETURN BOOLEAN;
Checks that the specified DOMDOCUMENT
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMDocument Subprograms):
DBMS_XMLDOM.ISNULL( doc IN DOMDOCUMENT) RETURN BOOLEAN;
Checks that the specified DOMDOCUMENTFRAGMENT
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMDocumentFragment Subprograms):
DBMS_XMLDOM.ISNULL( df IN DOMDOCUMENTFRAGMENT) RETURN BOOLEAN;
Checks that the specified DOMDOCUMENTTYPE
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMDocumentType Subprograms):
DBMS_XMLDOM.ISNULL( dt IN DOMDOCUMENTTYPE) RETURN BOOLEAN;
Checks that the specified DOMELEMENT
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMElement Subprograms):
DBMS_XMLDOM.ISNULL( elem IN DOMELEMENT) RETURN BOOLEAN;
Checks that the specified DOMENTITY
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMEntity Subprograms):
DBMS_XMLDOM.ISNULL( ent IN DOMENTITY) RETURN BOOLEAN;
Checks that the specified DOMENTITYREFERENCE
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMEntityReference Subprograms):
DBMS_XMLDOM.ISNULL( EREF IN DOMENTITYREFERENCE) RETURN BOOLEAN;
Checks that the specified DOMIMPLEMENTATION
is NULL
; returns TRUE
if it is NULL
(See Also: DOMImplementation Subprograms):
DBMS_XMLDOM.ISNULL( di IN DOMIMPLEMENTATION) RETURN BOOLEAN;
Checks that the specified DOMNAMEDNODEMAP
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMNamedNodeMap Subprograms):
DBMS_XMLDOM.ISNULL( nnm IN DOMNAMEDNODEMAP) RETURN BOOLEAN;
Checks that the specified DOMNODELIST
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMNodeList Subprograms):
DBMS_XMLDOM.ISNULL( nl IN DOMNODELIST) RETURN BOOLEAN;
Checks that the specified DOMNOTATION
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMNotation Subprograms):
DBMS_XMLDOM.ISNULL( n IN DOMNOTATION) RETURN BOOLEAN;
Checks that the specified DOMPROCESSINGINSTRUCTION
is NULL
; returns TRUE
if it is NULL, FALSE
otherwise (See Also: DOMProcessingInstruction Subprograms):
DBMS_XMLDOM.ISNULL( pi IN DOMPROCESSINGINSTRUCTION) RETURN BOOLEAN;
Checks that the specified DOMTEXT
is NULL
; returns TRUE
if it is NULL
, FALSE
otherwise (See Also: DOMText Subprograms):
DBMS_XMLDOM.ISNULL( t IN DOMTEXT) RETURN BOOLEAN;
Table 171-94 ISNULL Function Parameters
Parameter | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This function is overloaded. The specific forms of functionality are described along with the syntax declarations.
Returns the item in the map which corresponds to the INDEX
parameter. If INDEX
is greater than or equal to the number of nodes in this map, this returns NULL
(See Also: DOMNamedNodeMap Subprograms):
DBMS_XMLDOM.ITEM( nnm IN DOMNAMEDNODEMAP, index IN NUMBER) RETURN DOMNODE;
Returns the item in the collection which corresponds to the INDEX
parameter. If index is greater than or equal to the number of nodes in the list, this returns NULL
(See Also: DOMNodeList Subprograms):
DBMS_XMLDOM.ITEM( nl IN DOMNODELIST, index IN NUMBER) RETURN DOMNODE;
This function casts a specified DOMNODE
to a DOMATTR
, and returns the DOMATTR
.
See Also:
DOMNode SubprogramsThis function casts a specified DOMNODE
to a DOMCDATASECTION
.
See Also:
DOMNode SubprogramsThis function casts a specified DOMNODE
to a DOMCHARACTERDATA
, and returns the DOMCHARACTERDATA
.
See Also:
DOMNode SubprogramsThis function casts a specified DOMNODE
to a DOMCOMMENT
, and returns the DOMCOMMENT
.
See Also:
DOMNode SubprogramsThis function casts a specified DOMNODE
to a DOMDOCUMENT
, and returns the DOMDOCUMENT
.
See Also:
DOMNode SubprogramsThis function casts a specified DOMNODE
to a DOMDOCUMENTFRAGMENT
, and returns the DOMDOCUMENTFRAGMENT
.
See Also:
DOMNode SubprogramsThis function casts a specified DOMNODE
to a DOMDOCUMENTTYPE
and returns the DOMDOCUMENTTYPE
.
See Also:
DOMNode SubprogramsThis function casts a specified DOMNODE
to a DOMELEMENT
, and returns the DOMELEMENT
.
See Also:
DOMNode SubprogramsThis function casts a specified DOMNODE
to a DOMENTITY
, and returns the DOMENTITY
.
See Also:
DOMNode SubprogramsThis function casts a specified DOMNODE
to a DOMENTITYREFERENCE
, and returns the DOMENTITYREFERENCE
.
See Also:
DOMNode SubprogramsThis function is overloaded. The specific forms of functionality are described along with the syntax declarations.
Casts specified DOMATTR
to a DOMNODE
, and returns the DOMNODE
(See Also: DOMAttr Subprograms):
DBMS_XMLDOM.MAKENODE( a IN DOMATTR) RETURN DOMNODE;
Casts the DOMCDATASECTION
to a DOMNODE
, and returns that DOMNODE
(See Also: DOMCDataSection Subprograms):
DBMS_XMLDOM.MAKENODE( cds IN DOMCDATASECTION) RETURN DOMNODE;
Casts the specified DOMCHARACTERDATA
as a DOMNODE
, and returns that DOMNODE
(See Also: DOMCharacterData Subprograms):
DBMS_XMLDOM.MAKENODE( cd IN DOMCHARACTERDATA) RETURN DOMNODE;
Casts the specified DOMCOMMENT
to a DOMNODE
, and returns that DOMNODE
(See Also: DOMComment Subprograms):
DBMS_XMLDOM.MAKENODE( com IN DOMCOMMENT) RETURN DOMNODE;
Casts the DOMDOCUMENT
to a DOMNODE
, and returns that DOMNODE
(See Also: DOMDocument Subprograms):
DBMS_XMLDOM.MAKENODE( doc IN DOMDOCUMENT) RETURN DOMNODE;
Casts the specified DOMDOCUMENTFRAGMENT
to a DOMNODE
, and returns that DOMNODE
(See Also: DOMDocumentFragment Subprograms):
DBMS_XMLDOM.MAKENODE( df IN DOMDOCUMENTFRAGMENT) RETURN DOMNode;
Casts the specified DOMDOCUMENTTYPE
to a DOMNODE
, and returns that DOMNODE
(See Also: DOMDocumentType Subprograms):
DBMS_XMLDOM.MAKENODE( dt IN DOMDOCUMENTTYPE) RETURN DOMNODE;
Casts the specified DOMELEMENT
to a DOMNODE
, and returns that DOMNODE
(See Also: DOMElement Subprograms):
DBMS_XMLDOM.MAKENODE( elem IN DOMELEMENT) RETURN DOMNODE;
Casts specified DOMENTITY
to a DOMNODE
, and returns that DOMNODE
(See Also: DOMEntity Subprograms):
DBMS_XMLDOM.MAKENODE( ent IN DOMENTITY) RETURN DOMNODE;
Casts the DOMENTITYREFERENCE
to a DOMNODE
, and returns that DOMNODE
(See Also: DOMEntityReference Subprograms):
DBMS_XMLDOM.MAKENODE( eref IN DOMENTITYREFERENCE) RETURN DOMNODE;
Casts the DOMNOTATION
to a DOMNODE
, and returns that DOMNODE
(See Also: DOMNotation Subprograms):
DBMS_XMLDOM.MAKENODE( n IN DOMNOTATION) RETURN DOMNODE;
Casts the DOMPROCESSINGINSTRUCTION
to a DOMNODE
, and returns the DOMNODE
(See Also: DOMProcessingInstruction Subprograms):
DBMS_XMLDOM.MAKENODE( pi IN DOMPROCESSINGINSTRUCTION) RETURN DOMNODE;
Casts the DOMTEXT
to a DOMNODE
, and returns that DOMNODE
(See Also: DOMText Subprograms):
DBMS_XMLDOM.MAKENODE( t IN DOMTEXT) RETURN DOMNODE;
Table 171-106 MAKENODE Function Parameters
Parameter | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
t |
|
This function casts a specified DOMNODE
to a DOMNOTATION
, and returns the DOMNOTATION
.
See Also:
DOMNode SubprogramsThis function casts a specified DOMNODE
to a DOMPROCESSINGINSTRUCTION
, and returns the Domprocessinginstruction
.
See Also:
DOMNode SubprogramsThis function casts a specified DOMNODE
to a DOMTEXT
, and returns the DOMTEXT
.
See Also:
DOMNode SubprogramsThis function returns a new DOMDOCUMENT
instance.
See Also:
DOMDocument SubprogramsReturns a new DOMDOCUMENT
instance:
DBMS_XMLDOM.NEWDOMDOCUMENT RETURN DOMDOCUMENT;
Returns a new DOMDOCUMENT
instance created from the specified XMLType
object:
DBMS_XMLDOM.NEWDOMDOCUMENT( xmldoc IN SYS.XMLTYPE) RETURN DOMDOCUMENT;
Returns a new DOMDOCUMENT
instance created from the specified CLOB
:
DBMS_XMLDOM.NEWDOMDOCUMENT( cl IN CLOB) RETURN DOMDOCUMENT;
This procedure normalizes the text children of the DOMELEMENT
.
See Also:
DOMElement SubprogramsThis procedure removes an attribute from the DOMELEMENT
by name.
See Also:
DOMElement SubprogramsRemoves the value of a DOMELEMENT
's attribute by name:
DBMS_XMLDOM.REMOVEATTRIBUTE( elem IN DOMELEMENT, name IN VARCHAR2);
Removes the value of a DOMELEMENT
's attribute by name and namespace URI.
DBMS_XMLDOM.REMOVEATTRIBUTE( elem IN DOMELEMENT, name IN VARCHAR2, ns IN VARCHAR2);
This function removes the specified attribute node from the DOMELEMENT
. The method returns the removed node.
See Also:
DOMElement SubprogramsThis function removes the child node indicated by oldchild
from the list of children, and returns it.
See Also:
DOMNode SubprogramsThis function removes from the map a node specified by name, and returns this node. When this map contains the attributes attached to an element, if the removed attribute is known to have a default value, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable.
See Also:
DOMNamedNodeMap SubprogramsRemoves a node specified by name:
DBMS_XMLDOM.REMOVENAMEDITEM( nnm IN DOMNamedNodeMap, name IN VARCHAR2) RETURN DOMNode;
Removes a node specified by name and namespace URI:
DBMS_XMLDOM.REMOVENAMEDITEM( nnm IN DOMNamedNodeMap, name IN VARCHAR2, ns IN VARCHAR2) RETURN DOMNode;
This function replaces the child node oldchild
with newchild
in the list of children, and returns the oldchild
node. If newchild
is a DocumentFragment
object, oldchild
is replaced by all of the DocumentFragment
children, which are inserted in the same order. If the newchild
is already in the tree, it is first removed.
See Also:
DOMNode SubprogramsDBMS_XMLDOM.REPLACECHILD( n IN DOMNode, newchild IN DOMNode, oldchild IN DOMNode) RETURN DOMNode;
This procedure changes a range of characters in the node. Upon success, data and length reflect the change.
See Also:
DOMCharacterData SubprogramsDBMS_XMLDOM.REPLACEDATA( cd IN DOMCHARACTERDATA, offset IN NUMBER, cnt IN NUMBER, arg IN VARCHAR2);
This function resolves the specified namespace prefix, and returns the resolved namespace.
See Also:
DOMElement SubprogramsSets the value of a DOMELEMENT
's attribute by name.
See Also:
DOMElement SubprogramsSets the value of a DOMELEMENT
's attribute by name:
DBMS_XMLDOM.SETATTRIBUTE( elem IN DOMELEMENT, name IN VARCHAR2, newvalue IN VARCHAR2);
Sets the value of a DOMElement
's attribute by name and namespace URI:
DBMS_XMLDOM.SETATTRIBUTE( elem IN DOMELEMENT, name IN VARCHAR2, newvalue IN VARCHAR2, ns IN VARCHAR2);
Adds a new attribute node to the DOMELEMENT
.
See Also:
DOMElement SubprogramsAdds a new attribute node to the DOMELEMENT
:
DBMS_XMLDOM.SETATTRIBUTENODE( elem IN DOMELEMENT, newAttr IN DOMATTR) RETURN DOMATTR;
Adds a new attribute node to the DOMElement
; namespace enabled:
DBMS_XMLDOM.SETATTRIBUTENODE( elem IN DOMELEMENT, newAttr IN DOMATTR, ns IN VARCHAR2) RETURN DOMATTR;
This function sets the characterset of the DOM document.
See Also:
DOMDocument SubprogramsThis is used for WRITETOFILE Procedures if not explicitly specified at that time.
This procedure is overloaded. The specific forms of functionality are described along with the syntax declarations.
Sets the character data of the node that implements this interface (See Also: DOMCharacterData Subprograms):
DBMS_XMLDOM.SETDATA( cd IN DOMCHARACTERDATA, data IN VARCHAR2);
Sets the content data of the DOMPROCESSINGINSTRUCTION
(See Also: DOMProcessingInstruction Subprograms):
DBMS_XMLDOM.SETDATA( pi IN DOMPROCESSINGINSTRUCTION, data IN VARCHAR2);
Given a DOM document, this procedure creates a new DTD with the specified name, system id and public id and sets it in the document. This DTD can later be retrieved using the GETDOCTYPE Function.
DBMS_XMLDOM.SETDOCTYPE( doc IN DOMDocument, name IN VARCHAR2, sysid IN VARCHAR2, pubid IN VARCHAR2);
Table 171-123 SETDOCTYPE Procedure Parameters
Parameter | Description |
---|---|
|
The document whose DTD has to be set |
|
The name that the doctype needs to be initialized with |
|
The system ID that the doctype needs to be initialized with |
|
The public ID that the doctype needs to be initialized with |
This function adds a node using its NodeName
attribute. If a node with that name is already present in this map, it is replaced by the new one. The old node is returned on replacement; if no replacement is made, NULL
is returned.
As the NodeName
attribute is used to derive the name under which the node must be stored, multiple nodes of certain types, those that have a "special" string value, cannot be stored because the names would clash. This is seen as preferable to allowing nodes to be aliased.
See Also:
DOMNamedNodeMap SubprogramsAdds a node using its NodeName
attribute:
DBMS_XMLDOM.SETNAMEDITEM( nnm IN DOMNAMEDNODEMAP, arg IN DOMNODE) RETURN DOMNode;
Adds a node using its NodeName
attribute and namespace URI:
DBMS_XMLDOM.SETNAMEDITEM( nnm IN DOMNAMEDNODEMAP, arg IN DOMNODE, ns IN VARCHAR2) RETURN DOMNode;
This procedure sets the value of this node, depending on its type. When it is defined to be NULL
, setting it has no effect.
See Also:
DOMNode SubprogramsThe operation of these subprograms is described with each syntax implementation.
See Also:
DOMNode SubprogramsThis function returns an instance of the PL/SQL XMLBINARYOUTPUTSTREAM
into which the caller can write the node value. The data type of the node must be RAW
or BLOB
– if not, an exception is raised.
DBMS_XMLDOM.SETNODEVALUEASBINARYSTREAM ( n IN DOMNODE) RETURN SYS.UTL_BINARYOUTPUTSTREAM;
Using this procedure, the application passes in an implementation of sys
.utl_BinaryInputStream
from which XDB reads data to populate the node. The data type of the node must be RAW
or BLOB – if not an exception is raised.
DBMS_XMLDOM.SETNODEVALUEASBINARYSTREAM ( n in DOMNODE, value in SYS.UTL_BINARYINPUTSTREAM);
The operation of these subprograms is described with each syntax implementation.
See Also:
DOMNode SubprogramsThis function returns an instance of the PL/SQL XMLCHARACTEROUTPUTSTREAM
type into which the caller can write the node value. The data type of the node can be any valid XDB data type. If the type is not character or CLOB
, the character data written to the stream is converted to the node data type. If the data type of the node is character or CLOB
, then the character data written to the stream is converted from PL/SQL session character set to the character set of the node.
DBMS_XMLDOM.SETNODEVALUEASCHARACTERSTREAM ( n IN DOMNODE) RETURN SYS.UTL_CHARACTEROUTPUTSTREAM;
Using this procedure, the application passes in an implementation of SYS
.UTL_CHARACTERINPUTSTREAM
from which XDB reads to populate the node. The data type of the node may be any valid type supported by XDB. If a non-character data type, the character data read from the stream is converted to the data type of the node. If the data type of the node is either character or CLOB
, then no conversion occurs and the character set of the node becomes the character set of the PL/SQL session.
DBMS_XMLDOM.SETNODEVALUEASCHARACTERSTREAM ( n IN DOMNODE, value IN SYS.UTL_CHARACTERINPUTSTREAM);
This procedure sets the namespace prefix for this node to the specified value.
See Also:
DOMNode SubprogramsThis procedure sets the standalone property of the DOMDOCUMENT
.
See Also:
DOMDocument SubprogramsThis procedure sets the version of the DOMDOCUMENT
.
See Also:
DOMDocument SubprogramsThis function breaks this DOMTEXT
node into two DOMTEXT
nodes at the specified offset.
See Also:
DOMText SubprogramsThis function extracts a range of data from the node.
See Also:
DOMCharacterData SubprogramsDBMS_XMLDOM.SUBSTRINGDATA( cd IN DOMCHARACTERDATA, offset IN NUMBER, cnt IN NUMBER) RETURN VARCHAR2;
This function returns TRUE
if the data type of the node is RAW
or BLOB
so that the node value may be read or written using an UTL_BINARYINPUTSTREAM
or UTL_BINARYOUTPUTSTREAM
. If a value of FALSE
is returned, the node value may only be accessed through an UTL_CHARACTERINPUTSTREAM
or UTL_CHARACTEROUTPUTSTREAM
.
See Also:
DOMNode SubprogramsThis procedure is overloaded. The specific forms of functionality are described along with the syntax declarations.
Writes XML node to specified buffer using the database character set (See Also: DOMNode Subprograms):
DBMS_XMLDOM.WRITETOBUFFER( n IN DOMNODE, buffer IN OUT VARCHAR2);
Writes XML document to a specified buffer using database character set (See Also: DOMDocument Subprograms):
DBMS_XMLDOM.WRITETOBUFFER( doc IN DOMDOCUMENT, buffer IN OUT VARCHAR2);
Writes the contents of the specified document fragment into a buffer using the database character set (See Also: DOMDocumentFragment Subprograms):
DBMS_XMLDOM.WRITETOBUFFER( df IN DOMDOCUMENTFRAGMENT, buffer IN OUT VARCHAR2);
This procedure is overloaded. The specific forms of functionality are described along with the syntax declarations.
Writes XML node to specified CLOB
using the database character set (See Also: DOMNode Subprograms):
DBMS_XMLDOM.WRITETOCLOB( n IN DOMNODE, cl IN OUT CLOB);
Writes XML document to a specified CLOB
using database character set (See Also: DOMDocument Subprograms):
DBMS_XMLDOM.WRITETOCLOB( doc IN DOMDOCUMENT, cl IN OUT CLOB);
This procedure is overloaded. The specific forms of functionality are described along with the syntax declarations.
Writes XML node to specified file using the database character set (See Also: DOMNode Subprograms):
DBMS_XMLDOM.WRITETOFILE( n IN DOMNODE, fileName IN VARCHAR2);
Writes XML node to specified file using the specified character set, which is passed in as a separate parameter (See Also: DOMNode Subprograms):
DBMS_XMLDOM.WRITETOFILE( n IN DOMNODE, fileName IN VARCHAR2, charset IN VARCHAR2);
Writes an XML document to a specified file using database character set (See Also: DOMDocument Subprograms):
DBMS_XMLDOM.WRITETOFILE( doc IN DOMDOCUMENT, filename IN VARCHAR2);
Writes an XML document to a specified file using specified character set (See Also: DOMDocument Subprograms):
DBMS_XMLDOM.WRITETOFILE( doc IN DOMDOCUMENT, fileName IN VARCHAR2, charset IN VARCHAR2);
Table 171-137 WRITETOFILE Procedure Parameters
Parameter | Description |
---|---|
|
|
|
File to which to write. The filename should be in standard directory to filename format, for example |
|
specified character set |
|
|
|
Character set |