Skip Headers

Oracle9i XML Reference
Release 1 (9.0.1)

Part Number A88899-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

6
XML Parser for PL/SQL

This chapter describes the Extensible Markup Language (XML) Parser for PL/SQL. It has three main sections:

PL/SQL Parser APIs

The Extensible Markup Language (XML) describes a class of data objects called XML documents. It partially describes the behavior of computer programs which process them. XML is an application profile or restricted form of the Standard Generalized Markup Language (SGML) By construction, XML documents are conforming SGML documents.

XML documents are made up of storage units called entities, which contain either parsed or unparsed data. Parsed data is made up of characters, some of which form character data, and some of which form markup. Markup encodes a description of the document's storage layout and logical structure. XML provides a mechanism to impose constraints on the storage layout and logical structure.

A software module called an XML processor is used to read XML documents and provide access to their content and structure. It is assumed that an XML processor is doing its work on behalf of another module, called the application. This PL/SQL implementation of the XML processor (or parser) followed the W3C XML specification (rev. REC-xml-19980210) and included the required behavior of an XML processor in terms of how it must read XML data and the information it must provide to the application.

The following is the default behavior for this PL/SQL XML parser:

The types and methods described in this document are made available by the PL/SQL package xmlparser.

Types and Functions

parse(VARCHAR2)

Parses XML stored in the given url/file and returns the built DOM Document

newParser

Returns a new parser instance

parse(Parser, VARCHAR2)

Parses xml stored in the given url/file

parseBuffer(Parser, VARCHAR2)

Parses xml stored in the given buffer

parseClob(Parser, CLOB)

Parses xml stored in the given clob

parseDTD(Parser, VARCHAR2, VARCHAR2)

Parses xml stored in the given url/file

parseDTDBuffer(Parser, VARCHAR2, VARCHAR2)

Parses xml stored in the given buffer

parseDTDClob(Parser, CLOB, VARCHAR2)

Parses xml stored in the given clob

setBaseDir(Parser, VARCHAR2)

Sets base directory used to resolve relative urls

showWarnings(Parser, BOOLEAN)

Turn warnings on or off

setErrorLog(Parser, VARCHAR2)

Sets errors to be sent to the specified file

setPreserveWhitespace(Parser, BOOLEAN)

Sets white space preserve mode

setValidationMode(Parser, BOOLEAN)

Sets validation mode

getValidationMode(Parser)

Gets validation mode

setDoctype(Parser, DOMDocumentType)

Sets DTD

getDoctype(Parser)

Gets DTD Parser

getDocument(Parser)

Gets DOM document

freeParser(Parser)

Free a Parser object

Parser Interface Type Description

TYPE Parser IS RECORD ( ID VARCHAR2(5) );

Function Prototypes

parse

PURPOSE

Parses xml stored in the given url/file and returns the built DOM Document.

SYNTAX

FUNCTION parse(url VARCHAR2) RETURN DOMDocument; 

PARAMETERS

url      (IN)-  complete path of the url/file to be parsed 

RETURNS

Nothing

COMMENTS

This is meant to be used when the default parser behavior is acceptable and just a url/file needs to be parsed.

An application error is raised if parsing failed, for some reason.

newParser

PURPOSE

Returns a new parser instance

SYNTAX

FUNCTION newParser RETURN Parser; 

PARAMETERS

None

RETURNS

A new parser instance

COMMENTS

This function must be called before the default behavior of Parser can be changed and if other parse methods need to be used.

parse

PURPOSE

Parses xml stored in the given url/file

SYNTAX

 PROCEDURE parse(p Parser, url VARCHAR2); 

PARAMETERS

 p        (IN)-  parser instance
 url      (IN)-  complete path of the url/file to be parsed 

RETURNS

Nothing

COMMENTS

Any changes to the default parser behavior should be effected before calling this procedure.

An application error is raised if parsing failed, for some reason.

parseBuffer

PURPOSE

Parses xml stored in the given buffer

SYNTAX

 PROCEDURE parseBuffer(p Parser, doc VARCHAR2); 

PARAMETERS

 p        (IN)-  parser instance
 doc      (IN)-  xml document buffer to parse

RETURNS

Nothing

COMMENTS

Any changes to the default parser behavior should be effected before calling this procedure.

An application error is raised if parsing failed, for some reason.

parseClob

PURPOSE

Parses xml stored in the given clob

SYNTAX

 PROCEDURE parseClob(p Parser, doc CLOB); 

PARAMETERS

 p        (IN)-  parser instance
 doc      (IN)-  xml document clob to parse

RETURNS

Nothing

COMMENTS

Any changes to the default parser behavior should be effected before calling this procedure.

An application error is raised if parsing failed, for some reason.

parseDTD

PURPOSE

Parses the DTD stored in the given url/file

SYNTAX

 PROCEDURE parseDTD(p Parser, url VARCHAR2, root VARCHAR2); 

PARAMETERS

 p        (IN)-  parser instance
 url      (IN)-  complete path of the url/file to be parsed 
 root     (IN)-  name of the root element

RETURNS

Nothing

COMMENTS

Any changes to the default parser behavior should be effected before calling this procedure.

An application error is raised if parsing failed, for some reason.

parseDTDBuffer

PURPOSE

Parses the DTD stored in the given buffer

SYNTAX

 PROCEDURE parseDTDBuffer(p Parser, dtd VARCHAR2, root VARCHAR2); 

PARAMETERS

 p        (IN)-  parser instance
 dtd      (IN)-  dtd buffer to parse
 root     (IN)-  name of the root element

RETURNS

Nothing

COMMENTS

Any changes to the default parser behavior should be effected before calling this procedure.

An application error is raised if parsing failed, for some reason.

parseDTDClob

PURPOSE

Parses the DTD stored in the given clob

SYNTAX

 PROCEDURE parseDTDClob(p Parser, dtd CLOB, root VARCHAR2); 

PARAMETERS

 p        (IN)-  parser instance
 dtd      (IN)-  dtd clob to parse
 root     (IN)-  name of the root element

RETURNS

Nothing

COMMENTS

Any changes to the default parser behavior should be effected before calling this procedure.

An application error is raised if parsing failed, for some reason.

setBaseDir

PURPOSE

Sets base directory used to resolve relative urls

SYNTAX

 PROCEDURE setBaseDir(p Parser, dir VARCHAR2); 

PARAMETERS

 p        (IN)-  parser instance
 dir      (IN)-  directory to use as base directory

RETURNS

Nothing

COMMENTS

An application error is raised if parsing failed, for some reason.

showWarnings

PURPOSE

Turn warnings on or off

SYNTAX

 PROCEDURE showWarnings(p Parser, yes BOOLEAN); 

PARAMETERS

 p        (IN)-  parser instance
 yes      (IN)-  mode to set: TRUE - show warnings, FALSE - don't show warnings

RETURNS

Nothing

setErrorLog

PURPOSE

Sets errors to be sent to the specified file

SYNTAX

 PROCEDURE setErrorLog(p Parser, fileName VARCHAR2); 

PARAMETERS

 p        (IN)-  parser instance
 fileName (IN)-  complete path of the file to use as the error log

RETURNS

Nothing

setPreserveWhitespace

PURPOSE

Sets whitespace preserving mode

SYNTAX

 PROCEDURE setPreserveWhitespace(p Parser, yes BOOLEAN); 

PARAMETERS

 p        (IN)-  parser instance
 yes      (IN)-  mode to set: TRUE - preserve, FALSE - don't preserve

RETURNS

Nothing

setValidationMode

PURPOSE

Sets validation mode

SYNTAX

 PROCEDURE setValidationMode(p Parser, yes BOOLEAN); 

PARAMETERS

 p        (IN)-  parser instance
 yes      (IN)-  mode to set: TRUE - validating, FALSE - non valid

RETURNS

Nothing

getValidationMode

PURPOSE

Gets validation mode

SYNTAX

 FUNCTION getValidationMode(p Parser) RETURN BOOLEAN; 

PARAMETERS

 p        (IN)-  parser instance

RETURNS

The validation mode: TRUE - validating, FALSE - non valid

setDoctype

PURPOSE

Sets a DTD to be used by the parser for validation

SYNTAX

 PROCEDURE setDoctype(p Parser, dtd DOMDocumentType); 

PARAMETERS

 p        (IN)-  parser instance
 dtd      (IN)-  DTD to set

RETURNS

Nothing

getDoctype

PURPOSE

Gets DTD - MUST be called only after a DTD is parsed

SYNTAX

 FUNCTION getDoctype(p Parser) RETURN DOMDocumentType; 

PARAMETERS

 p        (IN)-  parser instance

RETURNS

The parsed DTD

getDocument

PURPOSE

Gets DOM Document built by the parser - MUST be called only after a document is parsed

SYNTAX

 FUNCTION getDocument(p Parser) RETURN DOMDocument; 

PARAMETERS

 p        (IN)-  parser instance

RETURNS

The root of the DOM tree

freeParser

PURPOSE

Free a parser object

SYNTAX

 PROCEDURE freeParser(p Parser) 

PARAMETERS

 p        (IN)-  parser instance

Extensible Stylesheet Language (XSL) Package Processor APIs

The Extensible Stylesheet Language Transformation (XSLT), describes rules for transforming a source tree into a result tree. A transformation expressed in XSLT is called a stylesheet. The transformation specified is achieved by associating patterns with templates defined in the stylesheet. A template is instantiated to create part of the result tree. This PL/SQL implementation of the XSL processor followed the W3C XSLT working draft (rev WD-xslt-19990813) and included the required behavior of an XSL processor in terms of how it must read XSLT stylesheets and the transformation it must effect.

The following is the default behavior for this PL/SQL XML parser:

The types and methods described in this document are made available by the PL/SQL package xslprocessor.

Functions

newProcessor

PURPOSE

Returns a new processor instance

SYNTAX

 FUNCTION newProcessor RETURN Processor;

PARAMETERS

None

RETURNS

A new processor instance

COMMENTS

This function must be called before the default behavior of Processor can be changed and if other processor methods need to be used.

processXSL

PURPOSE

Transforms input XML document using given DOMDocument and stylesheet

SYNTAX

 PROCEDURE processXSL(p Processor, ss Stylesheet, xmldoc DOMDocument);

PARAMETERS

 p        (IN)-  processor instance
 ss       (IN)-  stylesheet instance
 xmldoc   (IN)-  xml document to be transformed

RETURNS

Nothing

COMMENTS

Any changes to the default processor behavior should be effected before calling this procedure.

An application error is raised if processing failed, for some reason.

processXSL

PURPOSE

Transforms input XML document using given DOMDocumentFragment and stylesheet

SYNTAX

 PROCEDURE processXSL(p Processor, ss Stylesheet, xmldoc DOMDocumentFragment);

PARAMETERS

 p        (IN)-  processor instance
 ss       (IN)-  stylesheet instance
 xmldoc   (IN)-  xml document fragment to be transformed

RETURNS

Nothing

COMMENTS

Any changes to the default processor behavior should be effected before calling this procedure.

An application error is raised if processing failed, for some reason.

showWarnings

PURPOSE

Turn warnings on or off

SYNTAX

 PROCEDURE showWarnings(p Processor, yes BOOLEAN);

PARAMETERS

 p        (IN)-  processor instance
 yes      (IN)-  mode to set: TRUE - show warnings, FALSE - don't show warnings

RETURNS

Nothing

setErrorLog

PURPOSE

Sets errors to be sent to the specified file

SYNTAX

 PROCEDURE setErrorLog(p Processor, fileName VARCHAR2);

PARAMETERS

 p        (IN)-  processor instance
 fileName (IN)-  complete path of the file to use as the error log

RETURNS

Nothing

newStylesheet

PURPOSE

Create a new stylesheet using the given input and reference URLs

SYNTAX

 FUNCTION newStylesheet(inp VARCHAR2, ref VARCHAR2) RETURN Stylesheet;

PARAMETERS

 inp      (IN)-  input url to use for construction
 ref      (IN)-  reference url

RETURNS

 A new stylesheet instance 

transformNode

PURPOSE

Transforms a node in a DOM tree using the given stylesheet

SYNTAX

 FUNCTION transformNode(n DOMNode, ss Stylesheet) RETURN DOMDocumentFragment;

PARAMETERS

 n        (IN)-  DOM Node to transform
 ss       (IN)-  stylesheet to use

RETURNS

Result of the transformation

selectNodes

PURPOSE

Selects nodes from a DOM tree which match the given pattern

SYNTAX

 FUNCTION selectNodes(n DOMNode, pattern VARCHAR2) RETURN DOMNodeList;

PARAMETERS

 n        (IN)-  DOM Node to transform
 pattern  (IN)-  pattern to use

RETURNS

Result of the selection

selectSingleNodes

PURPOSE

Selects the first node from the tree that matches the given pattern

SYNTAX

 FUNCTION selectSingleNodes(n DOMNode, pattern VARCHAR2) RETURN DOMNode;

PARAMETERS

 n        (IN)-  DOM Node to transform
 pattern  (IN)-  pattern to use

RETURNS

Result of the selection

valueOf

PURPOSE

Retrieves the value of the first node from the tree that matches the given pattern

SYNTAX

 FUNCTION valueOf(n DOMNode, pattern VARCHAR2) RETURN VARCHAR2;

PARAMETERS

 n        (IN)-  DOM Node to transform
 pattern  (IN)-  pattern to use

RETURNS

Result of the selection

setParam

PURPOSE

Sets a top level paramter in the stylesheet

SYNTAX

PROCEDURE setParam(ss Stylesheet, name VARCHAR2, value VARCHAR2) 

PARAMETERS

 ss        (IN)-  stylesheet
 name      (IN)-  name of the param
 value      (IN)-  value of the param

removeParam

PURPOSE

Removes a top level stylesheet parameter

SYNTAX

 PROCEDURE removeParam(ss Stylesheet, name VARCHAR2)

PARAMETERS

 ss       (IN)-  Stylesheet
 name  (IN)-  name of the parameter

resetParams

PURPOSE

Resets the top-level stylesheet parameters

SYNTAX

 PROCEDURE resetParams(ss Stylesheet)

PARAMETERS

 ss        (IN)-  Stylesheet

freeStylesheet

PURPOSE

Frees a Stylesheet object

SYNTAX

 PROCEDURE freestylesheet(ss Stylesheet)

PARAMETERS

 ss        (IN)-  Stylesheet

freeProcessor

PURPOSE

Frees a Processor object

SYNTAX

 PROCEDURE freeProccessor(p Processor)

PARAMETERS

 p        (IN)-  Processor

W3C Document Object Model (DOM) APIs

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 way a document is accessed and manipulated. In the DOM specification, the term "document" is used in the broad sense. XML is increasingly being used as a way of representing many different kinds of information that may be stored in diverse systems, and much of this would traditionally be seen as data rather than as documents. Nevertheless, XML presents this data as documents, and the DOM may be used to manage this data.

With the Document Object Model, programmers can build documents, navigate their structure, and add, modify, or delete elements and content. 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 specification for the Document Object Model is to provide a standard programming interface that can be used in a wide variety of environments and applications. The DOM is designed to be used with any programming language. Since the DOM standard is object-oriented, for this PL/SQL adaptation, some changes had to be made:

FUNCTION

appendChild(n DOMNode, newChild IN DOMNode) 

RETURN

DOMNode;

and to perform setAttribute on a DOM Element elem, the following PL/SQL procedure is provided:

PROCEDURE

setAttribute(elem DOMElement, name IN VARCHAR2, 
                            value IN VARCHAR2); 

DOM defines an inheritance hierarchy. For example, Document, Element, and Attr are defined to be subtypes of Node. Thus, a method defined in the Node interface should be available in these as well. Since, such inheritance is not directly possible in PL/SQL, the makeNode functions need to be invoked on different DOM types to convert these into a DOMNode. The appropriate functions or procedures that accept DOMNodes can then be called to operate on these types. If, subsequently, type specific functionality is desired, the DOMNode can be converted back into the type by using the makeXXX functions, where DOMXXX is the DOM type desired

The implementation of this PL/SQL DOM interface followed the DOM standard of revision REC-DOM-Level-1-19981001. The types and methods described in this document are made available by the PL/SQL package xmldom.

Types

DOM Node Types

ELEMENT_NODE

ATTRIBUTE_NODE

TEXT_NODE

CDATA_SECTION_NODE

ENTITY_REFERENCE_NODE

ENTITY_NODE

PROCESSING_INSTRUCTION_NODE

COMMENT_NODE

DOCUMENT_NODE

DOCUMENT_TYPE_NODE

DOCUMENT_FRAGMENT_NODE

NOTATION_NODE

DOM Exception Types

INDEX_SIZE_ERR

DOMSTRING_SIZE_ERR

HIERARCHY_REQUEST_ERR

WRONG_DOCUMENT_ERR

INVALID_CHARACTER_ERR

NO_DATA_ALLOWED_ERR

NO_MODIFICATION_ALLOWED_ERR

NOT_FOUND_ERR

NOT_SUPPORTED_ERR

INUSE_ATTRIBUTE_ERR

DOM Interface Types

DOMNode

DOMNamedNodeMap

DOMNodeList

DOMAttr

DOMCDataSection

DOMCharacterData

DOMComment

DOMDocumentFragment

DOMElement

DOMEntity

DOMEntityReference

DOMNotation

DOMProcessingInstruction

DOMText

DOMImplementation

DOMDocumentType

DOMDocument

Methods

Node Methods

FUNCTION

isNull(n DOMNode)

RETURN

BOOLEAN;

FUNCTION

makeAttr(n DOMNode)

RETURN

DOMAttr;

FUNCTION

makeCDataSection(n DOMNode)

RETURN

DOMCDataSection;

FUNCTION

makeCharacterData(n DOMNode)

RETURN

DOMCharacterData;

FUNCTION

makeComment(n DOMNode)

RETURN

DOMComment;

FUNCTION

makeDocumentFragment(n DOMNode)

RETURN

DOMDocumentFragment;

FUNCTION

makeDocumentType(n DOMNode)

RETURN

DOMDocumentType;

FUNCTION

makeElement(n DOMNode)

RETURN

DOMElement;

FUNCTION

makeEntity(n DOMNode)

RETURN

DOMEntity;

FUNCTION

makeEntityReference(n DOMNode)

RETURN

DOMEntityReference;

FUNCTION

makeNotation(n DOMNode)

RETURN

DOMNotation;

FUNCTION

makeProcessingInstruction(n DOMNode)

RETURN

DOMProcessingInstruction;

makeText(n DOMNode) RETURN DOMText;

FUNCTION

makeDocument(n DOMNode)

RETURN

DOMDocument;

PROCEDURE

writeToFile(n DOMNode, fileName VARCHAR2);

PROCEDURE

writeToBuffer(n DOMNode, buffer IN OUT VARCHAR2);

PROCEDURE

writeToClob(n DOMNode, cl IN OUT CLOB);

PROCEDURE

writeToFile(n DOMNode, fileName VARCHAR2, charset VARCHAR2);

PROCEDURE

writeToBuffer(n DOMNode, buffer IN OUT VARCHAR2, charset VARCHAR2);

PROCEDURE

writeToClob(n DOMNode, cl IN OUT CLOB, charset VARCHAR2);

FUNCTION

getNodeName(n DOMNode)

RETURN

VARCHAR2;

FUNCTION

getNodeValue(n DOMNode)

RETURN

VARCHAR2;

PROCEDURE

setNodeValue(n DOMNode, nodeValue IN VARCHAR2);

FUNCTION

getNodeType(n DOMNode)

RETURN

NUMBER;

FUNCTION

getParentNode(n DOMNode)

RETURN

DOMNode;

FUNCTION

getChildNodes(n DOMNode)

RETURN

DOMNodeList;

FUNCTION

getFirstChild(n DOMNode)

RETURN

DOMNode;

FUNCTION

getLastChild(n DOMNode)

RETURN

DOMNode;

FUNCTION

getPreviousSibling(n DOMNode)

RETURN

DOMNode;

FUNCTION

getNextSibling(n DOMNode)

RETURN

DOMNode;

FUNCTION

getAttributes(n DOMNode)

RETURN

DOMNamedNodeMap;

FUNCTION

getOwnerDocument(n DOMNode)

RETURN

DOMDocument;

FUNCTION

insertBefore(n DOMNode, newChild IN DOMNode, refChild IN DOMNode)

RETURN

DOMNode;

FUNCTION

replaceChild(n DOMNode, newChild IN DOMNode, oldChild IN DOMNode)>

RETURN

DOMNode;

FUNCTION

removeChild(n DOMNode, oldChild IN DOMNode)

RETURN

DOMNode;

FUNCTION

appendChild(n DOMNode, newChild IN DOMNode)

RETURN

DOMNode;

FUNCTION

hasChildNodes(n DOMNode)

RETURN

BOOLEAN;

FUNCTION

cloneNode(n DOMNode, deep boolean)

RETURN

DOMNode;

Named Node Map Methods

FUNCTION

isNull(nnm DOMNamedNodeMap)

RETURN

BOOLEAN;

FUNCTION

getNamedItem(nnm DOMNamedNodeMap, name IN VARCHAR2)

RETURN

DOMNode;

FUNCTION

setNamedItem(nnm DOMNamedNodeMap, arg IN DOMNode)

RETURN

DOMNode;

FUNCTION

removeNamedItem(nnm DOMNamedNodeMap, name IN VARCHAR2)

RETURN

DOMNode;

FUNCTION

item(nnm DOMNamedNodeMap, idx IN NUMBER)

RETURN

DOMNode;

FUNCTION

getLength(nnm DOMNamedNodeMap)

RETURN

NUMBER;

Node List Methods

FUNCTION

isNull(nl DOMNodeList)

RETURN

BOOLEAN;

FUNCTION

item(nl DOMNodeList, idx IN NUMBER)

RETURN

DOMNode;

FUNCTION

getLength(nl DOMNodeList)

RETURN

NUMBER;

Attr Methods

FUNCTION

isNull(a DOMAttr)

RETURN

BOOLEAN;

FUNCTION

makeNode(a DOMAttr)

RETURN

DOMNode;

FUNCTION

getQualifiedName(a DOMAttr)

RETURN

VARCHAR2;

FUNCTION

getNamespace(a DOMAttr)

RETURN

VARCHAR2;

FUNCTION

getLocalName(a DOMAttr)

RETURN

VARCHAR2;

FUNCTION

getExpandedName(a DOMAttr)

RETURN

VARCHAR2;

FUNCTION

getName(a DOMAttr)

RETURN

VARCHAR2;

FUNCTION

getSpecified(a DOMAttr)

RETURN

BOOLEAN;

FUNCTION

getValue(a DOMAttr)

RETURN

VARCHAR2;

PROCEDURE

setValue(a DOMAttr, value IN VARCHAR2);

C Data Section Methods

FUNCTION

isNull(cds DOMCDataSection)

RETURN

BOOLEAN;

FUNCTION

makeNode(cds DOMCDataSection)

RETURN

DOMNode;

Character Data Methods

FUNCTION

isNull(cd DOMCharacterData)

RETURN

BOOLEAN;

FUNCTION

makeNode(cd DOMCharacterData)

RETURN

DOMNode;

FUNCTION

getData(cd DOMCharacterData)

RETURN

VARCHAR2;

PROCEDURE

setData(cd DOMCharacterData, data IN VARCHAR2);

FUNCTION

getLength(cd DOMCharacterData)

RETURN

NUMBER;

FUNCTION

substringData(cd DOMCharacterData, offset IN NUMBER, cnt IN NUMBER)

RETURN

VARCHAR2;

PROCEDURE

appendData(cd DOMCharacterData, arg IN VARCHAR2);

PROCEDURE

insertData(cd DOMCharacterData, offset IN NUMBER, arg IN VARCHAR2);

PROCEDURE

deleteData(cd DOMCharacterData, offset IN NUMBER, cnt IN NUMBER);

PROCEDURE

replaceData(cd DOMCharacterData, offset IN NUMBER, cnt IN NUMBER, arg IN VARCHAR2);

Comment Methods

FUNCTION

isNull(com DOMComment)

RETURN

BOOLEAN;

FUNCTION

makeNode(com DOMComment)

RETURN

DOMNode;

DOM Implementation Methods

FUNCTION

isNull(di DOMImplementation)

RETURN

BOOLEAN;

FUNCTION

hasFeature(di DOMImplementation, feature IN VARCHAR2, version IN VARCHAR2)

RETURN

BOOLEAN;

Document Fragment Methods

FUNCTION

isNull(df DOMDocumentFragment)

RETURN

BOOLEAN;

FUNCTION

makeNode(df DOMDocumentFragment)

RETURN

DOMNode;

Document Type Methods

FUNCTION

isNull(dt DOMDocumentType)

RETURN

BOOLEAN;

FUNCTION

makeNode(dt DOMDocumentType)

RETURN

DOMNode;

FUNCTION

findEntity(dt DOMDocumentType, name VARCHAR2, par BOOLEAN)

RETURN

DOMEntity;

FUNCTION

findNotation(dt DOMDocumentType, name VARCHAR2)

RETURN

DOMNotation;

FUNCTION

getPublicId(dt DOMDocumentType)

RETURN

VARCHAR2;

FUNCTION

getSystemId(dt DOMDocumentType)

RETURN

VARCHAR2;

PROCEDURE

writeExternalDTDToFile(dt DOMDocumentType, fileName VARCHAR2);

PROCEDURE

writeExternalDTDToBuffer(dt DOMDocumentType, buffer IN OUT VARCHAR2);

PROCEDURE

writeExternalDTDToClob(dt DOMDocumentType, cl IN OUT CLOB);

PROCEDURE

writeExternalDTDToFile(dt DOMDocumentType, fileName VARCHAR2, charset VARCHAR2);

PROCEDURE

writeExternalDTDToBuffer(dt DOMDocumentType, buffer IN OUT VARCHAR2, charset VARCHAR2);

PROCEDURE

writeExternalDTDToClob(dt DOMDocumentType, cl IN OUT CLOB, charset VARCHAR2);

FUNCTION

getName(dt DOMDocumentType)

RETURN

VARCHAR2;

FUNCTION

getEntities(dt DOMDocumentType)

RETURN

DOMNamedNodeMap;

FUNCTION

getNotations(dt DOMDocumentType)

RETURN

DOMNamedNodeMap;

Element Methods

FUNCTION

isNull(elem DOMElement)

RETURN

BOOLEAN;

FUNCTION

makeNode(elem DOMElement)

RETURN

DOMNode;

FUNCTION

getQualifiedName(elem DOMElement)

RETURN

VARCHAR2;

FUNCTION

getNamespace(elem DOMElement)

RETURN

VARCHAR2;

FUNCTION

getLocalName(elem DOMElement)

RETURN

VARCHAR2;

FUNCTION

getExpandedName(elem DOMElement)

RETURN

VARCHAR2;

FUNCTION

getChildrenByTagName(elem DOMElement, name IN VARCHAR2)

RETURN

DOMNodeList;

FUNCTION

getElementsByTagName(elem DOMElement, name IN VARCHAR2, ns VARCHAR2)

RETURN

DOMNodeList;

FUNCTION

getChildrenByTagName(elem DOMElement, name IN VARCHAR2, ns VARCHAR2)

RETURN

DOMNodeList;

FUNCTION

resolveNamespacePrefix(elem DOMElement, prefix VARCHAR2)

RETURN

VARCHAR2;

FUNCTION

getTagName(elem DOMElement)

RETURN

VARCHAR2;

FUNCTION

getAttribute(elem DOMElement, name IN VARCHAR2)

RETURN

VARCHAR2;

PROCEDURE

setAttribute(elem DOMElement, name IN VARCHAR2, value IN VARCHAR2);

PROCEDURE

removeAttribute(elem DOMElement, name IN VARCHAR2);

FUNCTION

getAttributeNode(elem DOMElement, name IN VARCHAR2)

RETURN

DOMAttr;

FUNCTION

setAttributeNode(elem DOMElement, newAttr IN DOMAttr)

RETURN

DOMAttr;

FUNCTION

removeAttributeNode(elem DOMElement, oldAttr IN DOMAttr)

RETURN

DOMAttr;

FUNCTION

getElementsByTagName(elem DOMElement, name IN VARCHAR2)

RETURN

DOMNodeList;

PROCEDURE

normalize(elem DOMElement);

Entity Methods

FUNCTION

isNull(ent DOMEntity)

RETURN

BOOLEAN;

FUNCTION

makeNode(ent DOMEntity)

RETURN

DOMNode;

FUNCTION

getPublicId(ent DOMEntity)

RETURN

VARCHAR2;

FUNCTION

getSystemId(ent DOMEntity)

RETURN

VARCHAR2;

FUNCTION

getNotationName(ent DOMEntity)

RETURN

VARCHAR2;

Entity Reference Methods

FUNCTION

isNull(eref DOMEntityReference)

RETURN

BOOLEAN;

FUNCTION

makeNode(eref DOMEntityReference)

RETURN

DOMNode;

Notation Methods

FUNCTION

isNull(n DOMNotation)

RETURN

BOOLEAN;

FUNCTION

makeNode(n DOMNotation)

RETURN

DOMNode;

FUNCTION

getPublicId(n DOMNotation)

RETURN

VARCHAR2;

FUNCTION

getSystemId(n DOMNotation)

RETURN

VARCHAR2;

Processing Instruction Methods

FUNCTION

isNull(pi DOMProcessingInstruction)

RETURN

BOOLEAN;

FUNCTION

makeNode(pi DOMProcessingInstruction)

RETURN

DOMNode;

FUNCTION

getData(pi DOMProcessingInstruction)

RETURN

VARCHAR2;

FUNCTION

getTarget(pi DOMProcessingInstruction)

RETURN

VARCHAR2;

PROCEDURE

setData(pi DOMProcessingInstruction, data IN VARCHAR2);

Text Methods

FUNCTION

isNull(t DOMText)

RETURN

BOOLEAN;

FUNCTION

makeNode(t DOMText)

RETURN

DOMNode;

FUNCTION

splitText(t DOMText, offset IN NUMBER)

RETURN

DOMText;

Document Methods

FUNCTION

isNull(doc DOMDocument)

RETURN

BOOLEAN;

FUNCTION

makeNode(doc DOMDocument)

RETURN

DOMNode;

FUNCTION

newDOMDocument

RETURN

DOMDocument;

FUNCTION

getVersion(doc DOMDocument)

RETURN

VARCHAR2;

PROCEDURE

setVersion(doc DOMDocument, version VARCHAR2);

FUNCTION

getCharset(doc DOMDocument)

RETURN

VARCHAR2;

PROCEDURE

setCharset(doc DOMDocument, charset VARCHAR2);

FUNCTION

getStandalone(doc DOMDocument)

RETURN

VARCHAR2;

PROCEDURE

setStandalone(doc DOMDocument, value VARCHAR2);

PROCEDURE

writeToFile(doc DOMDocument, fileName VARCHAR2);

PROCEDURE

writeToBuffer(doc DOMDocument, buffer IN OUT VARCHAR2);

PROCEDURE

writeToClob(doc DOMDocument, cl IN OUT CLOB);

PROCEDURE

writeToFile(doc DOMDocument, fileName VARCHAR2, charset VARCHAR2);

PROCEDURE

writeToBuffer(doc DOMDocument, buffer IN OUT VARCHAR2, charset VARCHAR2);

PROCEDURE

writeToClob(doc DOMDocument, cl IN OUT CLOB, charset VARCHAR2);

PROCEDURE

writeExternalDTDToFile(doc DOMDocument, fileName VARCHAR2);

PROCEDURE

writeExternalDTDToBuffer(doc DOMDocument, buffer IN OUT VARCHAR2);

PROCEDURE

writeExternalDTDToClob(doc DOMDocument, cl IN OUT CLOB);

PROCEDURE

writeExternalDTDToFile(doc DOMDocument, fileName VARCHAR2, charset VARCHAR2);

PROCEDURE

writeExternalDTDToBuffer(doc DOMDocument, buffer IN OUT VARCHAR2, charset VARCHAR2);

PROCEDURE

writeExternalDTDToClob(doc DOMDocument, cl IN OUT CLOB, charset VARCHAR2);

FUNCTION

getDoctype(doc DOMDocument)

RETURN

DOMDocumentType;

FUNCTION

getImplementation(doc DOMDocument)

RETURN

DOMImplementation;

FUNCTION

getDocumentElement(doc DOMDocument)

RETURN

DOMElement;

FUNCTION

createElement(doc DOMDocument, tagName IN VARCHAR2)

RETURN

DOMElement;

FUNCTION

createDocumentFragment(doc DOMDocument)

RETURN

DOMDocumentFragment;

FUNCTION

createTextNode(doc DOMDocument, data IN VARCHAR2)

RETURN

DOMText;

FUNCTION

createComment(doc DOMDocument, data IN VARCHAR2)

RETURN

DOMComment;

FUNCTION

createCDATASection(doc DOMDocument, data IN VARCHAR2)

RETURN

DOMCDATASection;

FUNCTION

createProcessingInstruction(doc DOMDocument, target IN VARCHAR2, data IN VARCHAR2)

RETURN

DOMProcessingInstruction;

FUNCTION

createAttribute(doc DOMDocument, name IN VARCHAR2)

RETURN

DOMAttr;

FUNCTION

createEntityReference(doc DOMDocument, name IN VARCHAR2)

RETURN

DOMEntityReference;

FUNCTION

getElementsByTagName(doc DOMDocument, tagname IN VARCHAR2)

RETURN

DOMNodeList;

Method Prototypes


Node Methods

FUNCTION

isNull(n DOMNode)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOMNode is null

SYNTAX

 FUNCTION isNull(n DOMNode) RETURN BOOLEAN; 

PARAMETERS

 n      (IN)-  DOMNode to check

RETURNS

Whether given DOMNode is null: TRUE - is null, FALSE - is not null

FUNCTION

makeAttr(n DOMNode)

RETURN

DOMAttr;

PURPOSE

Casts given DOMNode to a DOMAttr

SYNTAX

 FUNCTION makeAttr(n DOMNode) RETURN DOMAttr; 

PARAMETERS

 n      (IN)-  DOMNode to cast

RETURNS

The DOMAttr

FUNCTION

makeCDataSection(n DOMNode)

RETURN

DOMCDataSection;

PURPOSE

Casts given DOMNode to a DOMCDataSection

SYNTAX

 FUNCTION makeCDataSection(n DOMNode) RETURN DOMCDataSection; 

PARAMETERS

 n      (IN)-  DOMNode to cast

RETURNS

The DOMCDataSection

FUNCTION

makeCharacterData(n DOMNode)

RETURN

DOMCharacterData;

PURPOSE

Casts given DOMNode to a DOMCharacterData

SYNTAX

 FUNCTION makeCharacterData(n DOMNode) RETURN DOMCharacterData; 

PARAMETERS

 n      (IN)-  DOMNode to cast

RETURNS

The DOMCharacterData

FUNCTION

makeComment(n DOMNode)

RETURN

DOMComment;

PURPOSE

Casts given DOMNode to a DOMComment

SYNTAX

 FUNCTION makeComment(n DOMNode) RETURN DOMComment; 

PARAMETERS

 n      (IN)-  DOMNode to cast

RETURNS

The DOMComment

FUNCTION

makeDocumentFragment(n DOMNode)

RETURN

DOMDocumentFragment;

PURPOSE

Casts given DOMNode to a DOMDocumentFragment

SYNTAX

 FUNCTION makeDocumentFragment(n DOMNode) RETURN DOMDocumentFragment; 

PARAMETERS

 n      (IN)-  DOMNode to cast

RETURNS

The DOMDocumentFragment

FUNCTION makeDocumentType(n DOMNode) RETURN DOMDocumentType; 

PURPOSE

Casts given DOMNode to a DOMDocumentType

SYNTAX

 FUNCTION makeDocumentType(n DOMNode) RETURN DOMDocumentType; 

PARAMETERS

 n      (IN)-  DOMNode to cast

RETURNS

The DOMDocumentType

FUNCTION

makeElement(n DOMNode)

RETURNS

DOMElement;

PURPOSE

Casts given DOMNode to a DOMElement

SYNTAX

 FUNCTION makeElement(n DOMNode) RETURN DOMElement; 

PARAMETERS

 n      (IN)-  DOMNode to cast

RETURNS

The DOMElement

FUNCTION

makeEntity(n DOMNode)

RETURN

DOMEntity;

PURPOSE

Casts given DOMNode to a DOMEntity

SYNTAX

 FUNCTION makeEntity(n DOMNode) RETURN DOMEntity; 

PARAMETERS

 n      (IN)-  DOMNode to cast

RETURNS

The DOMEntity

FUNCTION

makeEntityReference(n DOMNode)

RETURN

DOMEntityReference;

PURPOSE

Casts given DOMNode to a DOMEntityReference

SYNTAX

 FUNCTION makeEntityReference(n DOMNode) RETURN DOMEntityReference; 

PARAMETERS

 n      (IN)-  DOMNode to cast

RETURNS

The DOMEntityReference

FUNCTION

makeNotation(n DOMNode)

RETURN

DOMNotation;

PURPOSE

Casts given DOMNode to a DOMNotation

SYNTAX

FUNCTION

makeNotation(n DOMNode)

RETURN

DOMNotation;

PARAMETERS

 n      (IN)-  DOMNode to cast

RETURNS

The DOMNotation

FUNCTION

makeProcessingInstruction(n DOMNode)

RETURN

DOMProcessingInstruction;

PURPOSE

Casts given DOMNode to a DOMProcessingInstruction

SYNTAX

FUNCTION

makeProcessingInstruction(n DOMNode)

RETURN

DOMProcessingInstruction; 

PARAMETERS

 n      (IN)-  DOMNode to cast

RETURNS

The DOMProcessingInstruction

FUNCTION

makeText(n DOMNode)

RETURN

DOMText;

PURPOSE

Casts given DOMNode to a DOMText

SYNTAX

FUNCTION

makeText(n DOMNode)

RETURN

DOMText; 

PARAMETERS

 n      (IN)-  DOMNode to cast

RETURNS

The DOMText

FUNCTION

makeDocument(n DOMNode)

RETURN

DOMDocument;

PURPOSE

Casts given DOMNode to a DOMDocument

SYNTAX

FUNCTION

makeDocument(n DOMNode)

RETURN

DOMDocument; 

PARAMETERS

 n      (IN)-  DOMNode to cast

RETURNS

The DOMDocument

PROCEDURE

writeToFile(n DOMNode, fileName VARCHAR2);

PURPOSE

Writes XML node to specified file using the database character set

SYNTAX

PROCEDURE

writeToFile(n DOMNode, fileName VARCHAR2); 

PARAMETERS

 n        (IN)-  DOMNode
 fileName (IN)-  File to write to

RETURNS

Nothing

PROCEDURE

writeToBuffer(n DOMNode, buffer IN OUT VARCHAR2);

PURPOSE

Writes XML node to specified buffer using the database character set

SYNTAX

PROCEDURE

writeToBuffer(n DOMNode, buffer IN OUT VARCHAR2); 

PARAMETERS

 n        (IN)-  DOMNode
 buffer   (OUT)- buffer to write to

RETURNS

Nothing

PROCEDURE

writeToClob(n DOMNode, cl IN OUT CLOB);

PURPOSE

Writes XML node to specified clob using the database character set

SYNTAX

PROCEDURE

writeToClob(n DOMNode, cl IN OUT CLOB); 

PARAMETERS

 n        (IN)-  DOMNode
 cl      (OUT)-  CLOB to write to

RETURNS

Nothing

PROCEDURE

writeToFile(n DOMNode, fileName VARCHAR2, charset VARCHAR2);

PURPOSE

Writes XML node to specified file using the given character set

SYNTAX

PROCEDURE

writeToFile(n DOMNode, fileName VARCHAR2, charset VARCHAR2); 

PARAMETERS

 n        (IN)-  DOMNode
 fileName (IN)-  File to write to
 charset  (IN)-  Character set

RETURNS

Nothing

PROCEDURE

writeToBuffer(n DOMNode, buffer IN OUT VARCHAR2, charset VARCHAR2);

PURPOSE

Writes XML node to specified buffer using the given character set

SYNTAX

PROCEDURE

writeToBuffer(n DOMNode, buffer IN OUT VARCHAR2, charset VARCHAR2); 

PARAMETERS

 n        (IN)-  DOMNode
 buffer   (OUT)- buffer to write to
 charset  (IN)-  Character set

RETURNS

Nothing

PROCEDURE

writeToClob(n DOMNode, cl IN OUT CLOB, charset VARCHAR2);

PURPOSE

Writes XML node to specified clob using the given character set

SYNTAX

PROCEDURE

writeToClob(n DOMNode, cl IN OUT CLOB, charset VARCHAR2); 

PARAMETERS

 n        (IN)-  DOMNode
 cl      (OUT)-  CLOB to write to
 charset  (IN)-  Character set

RETURNS

Nothing


Named Node Map Methods

FUNCTION

isNull(nnm DOMNamedNodeMap)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM NamedNodeMap is null

SYNTAX

FUNCTION

isNull(nnm DOMNamedNodeMap)

RETURN

BOOLEAN; 

PARAMETERS

 nnm      (IN)-  DOMNamedNodeMap to check

RETURNS

Whether given DOM NamedNodeMap is null: TRUE - is null, FALSE - is not null


Node List Methods

FUNCTION

isNull(nl DOMNodeList)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM NodeList is null

SYNTAX

 FUNCTION isNull(nl DOMNodeList) RETURN BOOLEAN; 

PARAMETERS

 nl      (IN)-  DOMNodeList to check

RETURNS

Whether given DOM NodeList is null: TRUE - is null, FALSE - is not null


Attr Methods

FUNCTION

isNull(a DOMAttr)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM Attr is null

SYNTAX

 FUNCTION isNull(a DOMAttr) RETURN BOOLEAN; 

PARAMETERS

 a      (IN)-  DOMAttr to check

RETURNS

Whether given DOM Attr is null: TRUE - is null, FALSE - is not null

FUNCTION

makeNode(a DOMAttr)

RETURN

DOMNode;

PURPOSE

Casts given DOMAttr to a DOMNode

SYNTAX

 FUNCTION makeNode(a DOMAttr) RETURN DOMNode; 

PARAMETERS

 a      (IN)-  DOMNode to cast

RETURNS

The DOMNode

FUNCTION

getQualifiedName(a DOMAttr)

RETURN

VARCHAR2;

PURPOSE

Returns the qualified name of the DOMAttr

SYNTAX

 FUNCTION getQualifiedName(a DOMAttr) RETURN VARCHAR2; 

PARAMETERS

 a      (IN)-  DOMAttr

RETURNS

The qualified name

FUNCTION

getNamespace(a DOMAttr)

RETURN

VARCHAR2;

PURPOSE

Returns the namespace of the DOMAttr

SYNTAX

FUNCTION getNamespace(a DOMAttr) RETURN VARCHAR2; 

PARAMETERS

 a      (IN)-  DOMAttr

RETURNS

The namespace

FUNCTION

getLocalName(a DOMAttr)

RETURN

VARCHAR2;

PURPOSE

Returns the local name of the DOMAttr

SYNTAX

FUNCTION getLocalName(a DOMAttr) RETURN VARCHAR2; 

PARAMETERS

 a      (IN)-  DOMAttr

RETURNS

The local name

FUNCTION

getExpandedName(a DOMAttr)

RETURN

VARCHAR2;

PURPOSE

Returns the expanded name of the DOMAttr

SYNTAX

FUNCTION getExpandedName(a DOMAttr) RETURN VARCHAR2; 

PARAMETERS

 a      (IN)-  DOMAttr

RETURNS

The expanded name


C Data Section Methods

FUNCTION

isNull(cds DOMCDataSection)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM CDataSection is null

SYNTAX

FUNCTION isNull(cds DOMCDataSection) RETURN BOOLEAN; 

PARAMETERS

cds      (IN)-  DOMCDataSection to check

RETURNS

Whether given DOM CDataSection is null: TRUE - is null, FALSE - is not null

FUNCTION

makeNode(cds DOMCDataSection)

RETURN

DOMNode;

PURPOSE

Casts given DOMCDataSection to a DOMNode

SYNTAX

 FUNCTION makeNode(cds DOMCDataSection) RETURN DOMNode; 

PARAMETERS

 cds      (IN)-  DOMCDataSection to cast

RETURNS

The DOMNode


Character Data Methods

FUNCTION

isNull(cd DOMCharacterData)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM CharacterData is null

SYNTAX

FUNCTION isNull(cd DOMCharacterData) RETURN BOOLEAN; 

PARAMETERS

 cd      (IN)-  DOMCharacterData to check

RETURNS

Whether given DOM CharacterData is null : TRUE - is null, FALSE - is not null

FUNCTION

makeNode(cd DOMCharacterData)

RETURN

DOMNode;

PURPOSE

Casts given DOMCharacterData to a DOMNode 

SYNTAX

FUNCTION makeNode(cd DOMCharacterData) RETURN DOMNode; 

PARAMETERS

 cd      (IN)-  DOMCharacterData to cast

RETURNS

The DOMNode


Comment Methods

FUNCTION

isNull(com DOMComment)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM Comment is null

SYNTAX

 FUNCTION isNull(com DOMComment) RETURN BOOLEAN; 

PARAMETERS

 com      (IN)-  DOMComment to check

RETURNS

Whether given DOM Comment is null: TRUE - is null, FALSE - is not null

FUNCTION

makeNode(com DOMComment)

RETURN

DOMNode;

PURPOSE

Casts given DOMComment to a DOMNode

SYNTAX

FUNCTION makeNode(com DOMComment) RETURN DOMNode; 

PARAMETERS

 com      (IN)-  DOMComment to ast

RETURNS

The DOMComment


DOM Implementation Methods

FUNCTION

isNull(di DOMImplementation)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM Implementation is null

SYNTAX

FUNCTION isNull(di DOMImplementation) RETURN BOOLEAN; 

PARAMETERS

 di      (IN)-  DOMImplementation to check

RETURNS

Whether given DOM Implementation is null: TRUE - is null, FALSE - is not null


Document Fragment Methods

FUNCTION

isNull(df DOMDocumentFragment)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM DocumentFragment is null

SYNTAX

FUNCTION isNull(df DOMDocumentFragment) RETURN BOOLEAN; 

PARAMETERS

 df      (IN)-  DOMDocumentFragment to check

RETURNS

Whether given DOM DocumentFragment is null: TRUE - is null, FALSE - is not null

FUNCTION

makeNode(df DOMDocumentFragment)

RETURN

DOMComment;

PURPOSE

Casts given DOMDocumentFragment to a DOMNode

SYNTAX

FUNCTION makeNode(df DOMDocumentFragment) RETURN DOMNode; 

PARAMETERS

 df      (IN)-  DOMDocumentFragment to cast

RETURNS

The DOMNode


Document Type Methods

FUNCTION

isNull(dt DOMDocumentType)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM DocumentType is null

SYNTAX

 FUNCTION isNull(dt DOMDocumentType) RETURN BOOLEAN; 

PARAMETERS

 dt      (IN)-  DOMDocumentType to check

RETURNS

Whether given DOM DocumentType is null: TRUE - is null, FALSE - is not null

FUNCTION

makeNode(dt DOMDocumentType)

RETURN

DOMNode;

PURPOSE

Casts given DOMDocumentType to a DOMNode

SYNTAX

 FUNCTION makeNode(dt DOMDocumentType) RETURN DOMNode; 

PARAMETERS

 dt      (IN)-  DOMDocumentType to cast

RETURNS

The DOMNode

FUNCTION

findEntity(dt DOMDocumentType, name VARCHAR2, par BOOLEAN)

RETURN

DOMEntity;

PURPOSE

Finds an entity in the given DTD

SYNTAX

FUNCTION findEntity(dt DOMDocumentType, name VARCHAR2, par BOOLEAN) RETURN 
DOMEntity; 

PARAMETERS

 dt      (IN)-  DTD
 name    (IN)-  entity to find
 par     (IN)-  TRUE - parameter entity, FALSE - normal entity

RETURNS

The DOMEntity, if found.

FUNCTION

findNotation(dt DOMDocumentType, name VARCHAR2)

RETURN

DOMNotation;

PURPOSE

Finds a notation in the given DTD

SYNTAX

 FUNCTION findNotation(dt DOMDocumentType, name VARCHAR2) RETURN DOMNotation; 

PARAMETERS

 dt      (IN)-  DTD
 name    (IN)-  notation to find

RETURNS

The DOMNotation, if found.

FUNCTION

getPublicId(dt DOMDocumentType)

RETURN

VARCHAR2;

PURPOSE

Return the public id of the given DTD

SYNTAX

FUNCTION getPublicId(dt DOMDocumentType) RETURN VARCHAR2; 

PARAMETERS

 dt      (IN)-  DTD

RETURNS

The public id

FUNCTION

getSystemId(dt DOMDocumentType)

RETURN

VARCHAR2;

PURPOSE

Return the system id of the given DTD

SYNTAX

FUNCTION getSystemId(dt DOMDocumentType) RETURN VARCHAR2; 

PARAMETERS

 dt      (IN)-  DTD

RETURNS

The system id

PROCEDURE

writeExternalDTDToFile(dt DOMDocumentType, fileName VARCHAR2);

PURPOSE

Writes DTD to specified file using the database character set

SYNTAX

PROCEDURE writeExternalDTDToFile(dt DOMDocumentType, fileName VARCHAR2); 

PARAMETERS

 dt       (IN)-  DOMDocumentType
 fileName (IN)-  File to write to

RETURNS

Nothing

PROCEDURE

writeExternalDTDToBuffer(dt DOMDocumentType, buffer IN OUT VARCHAR2);

PURPOSE

Writes DTD to specified buffer using the database character set

SYNTAX

PROCEDURE

writeExternalDTDToBuffer(dt DOMDocumentType, buffer IN OUT VARCHAR2); 

PARAMETERS

 dt       (IN)-  DOMDocumentType
 buffer   (OUT)- buffer to write to

RETURNS

Nothing

PROCEDURE

writeExternalDTDToClob(dt DOMDocumentType, cl IN OUT CLOB);

PURPOSE

Writes DTD to specified clob using the database character set

SYNTAX

 PROCEDURE writeExternalDTDToClob(dt DOMDocumentType, cl IN OUT CLOB); 

PARAMETERS

 dt       (IN)-  DOMDocumentType
 cl      (OUT)-  CLOB to write to

RETURNS

Nothing

PROCEDURE

writeExternalDTDToFile(dt DOMDocumentType, fileName VARCHAR2, charset VARCHAR2);

PURPOSE

Writes DTD to specified file using the given character set

SYNTAX

PROCEDURE

writeExternalDTDToFile(dt DOMDocumentType, fileName VARCHAR2, charset VARCHAR2); 

PARAMETERS

 dt       (IN)-  DOMDocumentType
 fileName (IN)-  File to write to
 charset  (IN)-  Character set

RETURNS

Nothing

PROCEDURE

writeExternalDTDToBuffer(dt DOMDocumentType, buffer IN OUT VARCHAR2, charset VARCHAR2);

PURPOSE

Writes DTD to specified buffer using the given character set

SYNTAX

PROCEDURE

writeExternalDTDToBuffer(dt DOMDocumentType, buffer IN OUT VARCHAR2, charset 
VARCHAR2); 

PARAMETERS

 dt       (IN)-  DOMDocumentType
 buffer   (OUT)- buffer to write to
 charset  (IN)-  Character set

RETURNS

Nothing

PROCEDURE

writeExternalDTDToClob(dt DOMDocumentType, cl IN OUT CLOB, charset VARCHAR2);

PURPOSE

Writes DTD to specified clob using the given character set

SYNTAX

 PROCEDURE writeExternalDTDToClob(dt DOMDocumentType, cl IN OUT CLOB, charset 
VARCHAR2); 

PARAMETERS

 dt       (IN)-  DOMDocumentType
 cl      (OUT)-  CLOB to write to
 charset  (IN)-  Character set

RETURNS

Nothing


Element Methods

FUNCTION

isNull(elem DOMElement)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM Element is null

SYNTAX

FUNCTION isNull(elem DOMElement) RETURN BOOLEAN; 

PARAMETERS

 elem      (IN)-  DOMElement to check

RETURNS

Whether given DOM Element is null: TRUE - is null, FALSE - is not null

FUNCTION

makeNode(elem DOMElement)

RETURN

DOMNode;

PURPOSE

Casts given DOMElement to a DOMNode

SYNTAX

 FUNCTION makeNode(elem DOMElement) RETURN DOMNode; 

PARAMETERS

 elem      (IN)-  DOMElement to cast

RETURNS

The DOMNode

FUNCTION

getQualifiedName(elem DOMElement)

RETURN

VARCHAR2;

PURPOSE

Returns the qualified name of the DOMElem

SYNTAX

FUNCTION

getQualifiedName(elem DOMElement)

RETURN

VARCHAR2; 

PARAMETERS

 elem      (IN)-  DOMElement

RETURNS

The qualified name

FUNCTION

getNamespace(elem DOMElement)

RETURN

VARCHAR2;

PURPOSE

Returns the namespace of the DOMElem

SYNTAX

 FUNCTION getNamespace(elem DOMElement) RETURN VARCHAR2; 

PARAMETERS

 elem      (IN)-  DOMElement

RETURNS

The namespace

FUNCTION

getLocalName(elem DOMElement)

RETURN

VARCHAR2;

PURPOSE

Returns the local name of the DOMElem

SYNTAX

 FUNCTION getLocalName(elem DOMElement) RETURN VARCHAR2; 

PARAMETERS

 elem      (IN)-  DOMElement

RETURNS

The local name

FUNCTION

getExpandedName(elem DOMElement)

RETURN

VARCHAR2;

PURPOSE

Returns the expanded name of the DOMElem

SYNTAX

 FUNCTION getExpandedName(elem DOMElement) RETURN VARCHAR2; 

PARAMETERS

 elem      (IN)-  DOMElement

RETURNS

The expanded name

FUNCTION

getChildrenByTagName(elem DOMElement, name varchar2)

RETURN

DOMNodeList;

PURPOSE

Returns the children of the DOMElem having the given tag name

SYNTAX

 FUNCTION getChildrenByTagName(elem DOMElement, name varchar2) RETURN 
DOMNodeList; 

PARAMETERS

 elem      (IN)-  DOMElement
 name      (IN)-  tag name (* matches any tag)

RETURNS

Children with the given tag name

FUNCTION

getElementsByTagName(elem DOMElement, name varchar2, ns VARCHAR2)

RETURN

DOMNodeList;

PURPOSE

Returns the element children of the DOMElem having the given tag name and namespace

SYNTAX

 FUNCTION getElementsByTagName(elem DOMElement, name varchar2, ns VARCHAR2 ) 
RETURN DOMNodeList; 

PARAMETERS

 elem      (IN)-  DOMElement
 name      (IN)-  tag name (* matches any tag)
 ns        (IN)-  namespace

RETURNS

Elements with the given tag name and namespace

FUNCTION

getChildrenByTagName(elem DOMElement, name varchar2, ns VARCHAR2)

RETURN

DOMNodeList;

PURPOSE

Returns the children of the DOMElem having the given tag name and namespace

SYNTAX

 FUNCTION getChildrenByTagName(elem DOMElement, name varchar2, ns VARCHAR2 ) 
RETURN DOMNodeList; 

PARAMETERS

 elem      (IN)-  DOMElement
 name      (IN)-  tag name (* matches any tag)
 ns        (IN)-  namespace

RETURNS

Children with the given tag name and namespace

FUNCTION

resolveNamespacePrefix(elem DOMElement, prefix VARCHAR2)

RETURN

VARCHAR2;

PURPOSE

Resolves the given namespace prefix

SYNTAX

 FUNCTION resolveNamespacePrefix(elem DOMElement, prefix VARCHAR2) RETURN 
VARCHAR2; 

PARAMETERS

 elem      (IN)-  DOMElement
 prefix    (IN)-  namespace prefix

RETURNS

The resolved namespace


Entity Methods

FUNCTION

isNull(ent DOMEntity)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM Entity is null

SYNTAX

 FUNCTION isNull(ent DOMEntity) RETURN BOOLEAN; 

PARAMETERS

 ent      (IN)-  DOMEntity to check

RETURNS

Whether given DOM Entity is null: TRUE - is null, FALSE - is not null

FUNCTION

makeNode(ent DOMEntity)

RETURN

DOMNode;

PURPOSE

Casts given DOMEntity to a DOMNode

SYNTAX

 FUNCTION makeNode(ent DOMEntity) RETURN DOMNode; 

PARAMETERS

 ent      (IN)-  DOMEntity to cast

RETURNS

The DOMNode


Entity Reference Methods

FUNCTION

isNull(eref DOMEntityReference)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM EntityReference is null

SYNTAX

 FUNCTION isNull(eref DOMEntityReference) RETURN BOOLEAN; 

PARAMETERS

 eref      (IN)-  DOMEntityReference to check

RETURNS

Whether given DOM EntityReference is null : TRUE - is null, FALSE - is not null

FUNCTION

makeNode(eref DOMEntityReference)

RETURN

DOMNode;

PURPOSE

Casts given DOMEntityReference to a DOMNode

SYNTAX

 FUNCTION makeNode(eref DOMEntityReference) RETURN DOMNode; 

PARAMETERS

 eref      (IN)-  DOMEntityReference to cast

RETURNS

The DOMNode


Notation Methods

FUNCTION

isNull(n DOMNotation)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM Notation is null

SYNTAX

 FUNCTION isNull(n DOMNotation) RETURN BOOLEAN; 

PARAMETERS

 n      (IN)-  DOMNotation to check

RETURNS

Whether given DOM Notation is null : TRUE - is null, FALSE - is not null

FUNCTION

makeNode(n DOMNotation)

RETURN

DOMNode;

PURPOSE

Casts given DOMNotation to a DOMNode

SYNTAX

 FUNCTION makeNode(n DOMNotation) RETURN DOMNode; 

PARAMETERS

 n      (IN)-  DOMNotation to cast

RETURNS

The DOMNode


Processing Instruction Methods

FUNCTION

isNull(pi DOMProcessingInstruction)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOM ProcessingInstruction is null

SYNTAX

 FUNCTION isNull(pi DOMProcessingInstruction) RETURN BOOLEAN; 

PARAMETERS

 pi      (IN)-  DOMProcessingInstruction to check

RETURNS

Whether given DOM ProcessingInstruction is null : TRUE - is null, FALSE - is not null

FUNCTION

makeNode(pi DOMProcessingInstruction)

RETURN

DOMNode;

PURPOSE

Casts given DOMProcessingInstruction to a DOMNode

SYNTAX

 FUNCTION makeNode(pi DOMProcessingInstruction) RETURN DOMNode; 

PARAMETERS

 pi      (IN)-  DOMProcessingInstruction to cast

RETURNS

The DOMNode


Text Methods

FUNCTION

isNull(t DOMText)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOMText is null

SYNTAX

 FUNCTION isNull(t DOMText) RETURN BOOLEAN;

PARAMETERS

 t      (IN)-  DOMText to check

RETURNS

Whether given DOMText is null : TRUE - is null, FALSE - is not null

FUNCTION

makeNode(t DOMText)

RETURN

DOMNode;

PURPOSE

Casts given DOMText to a DOMNode

SYNTAX

 FUNCTION makeNode(t DOMText) RETURN DOMNode; 

PARAMETERS

 t      (IN)-  DOMText to cast

RETURNS

The DOMNode


Document Methods

FUNCTION

isNull(doc DOMDocument)

RETURN

BOOLEAN;

PURPOSE

Checks if the given DOMDocument is null

SYNTAX

 FUNCTION isNull(doc DOMDocument) RETURN BOOLEAN;

PARAMETERS

 doc      (IN)-  DOMDocument to check

RETURNS

Whether given DOMDocument is null : TRUE - is null, FALSE - is not null

FUNCTION

makeNode(doc DOMDocument)

RETURN

DOMNode;

PURPOSE

Casts given DOMDocument to a DOMNode

SYNTAX

 FUNCTION makeNode(doc DOMDocument) RETURN DOMNode; 

PARAMETERS

 doc      (IN)-  DOMDocument to cast

RETURNS

The DOMNode

FUNCTION

newDOMDocument

RETURN

DOMDocument;

PURPOSE

Returns a new DOM Document instance

SYNTAX

 FUNCTION newDOMDocument RETURN DOMDocument; 

PARAMETERS

None

RETURNS

A new DOMDocument instance

PROCEDURE

freeDocument(doc DOMDocument)

PURPOSE

Frees Document object

SYNTAX

 PROCEDURE freeDocument(doc DOMDocument) 

PARAMETERS

 doc      (IN)-  DOMDocument

FUNCTION

getVersion(doc DOMDocument)

RETURN

VARCHAR2;

PURPOSE

Gets version information for the XML document

SYNTAX

 FUNCTION getVersion(doc DOMDocument) RETURN VARCHAR2; 

PARAMETERS

 doc      (IN)-  DOMDocument

RETURNS

Version information

PROCEDURE

setVersion(doc DOMDocument, version VARCHAR2);

PURPOSE

Sets version information for the XML document

SYNTAX

 PROCEDURE setVersion(doc DOMDocument, version VARCHAR2); 

PARAMETERS

 doc      (IN)-  DOMDocument
 version  (IN)-  version information

RETURNS

Nothing

FUNCTION

getCharset(doc DOMDocument)

RETURN

VARCHAR2;

PURPOSE

Gets character set of the XML document

SYNTAX

 FUNCTION getCharset(doc DOMDocument) RETURN VARCHAR2; 

PARAMETERS

 doc      (IN)-  DOMDocument

RETURNS

Character set of the XML document

PROCEDURE

setCharset(doc DOMDocument, charset VARCHAR2);

PURPOSE

Sets character set of the XML document

SYNTAX

 PROCEDURE setCharset(doc DOMDocument, charset VARCHAR2); 

PARAMETERS

 doc      (IN)-  DOMDocument
 charset  (IN)-  Character set

RETURNS

Nothing

FUNCTION

getStandalone(doc DOMDocument)

RETURN

VARCHAR2;

PURPOSE

Gets standalone information for the XML document

SYNTAX

 FUNCTION getStandalone(doc DOMDocument) RETURN VARCHAR2; 

PARAMETERS

 doc      (IN)-  DOMDocument

RETURNS

Standalone information

PROCEDURE

setStandalone(doc DOMDocument, value VARCHAR2);

PURPOSE

Sets standalone information for the XML document

SYNTAX

 PROCEDURE setStandalone(doc DOMDocument, value VARCHAR2); 

PARAMETERS

 doc      (IN)-  DOMDocument
 value    (IN)-  standalone information

RETURNS

Nothing

PROCEDURE

writeToFile(doc DOMDocument, fileName VARCHAR2);

PURPOSE

Writes XML document to specified file using the database character set

SYNTAX

 PROCEDURE writeToFile(doc DOMDocument, fileName VARCHAR2); 

PARAMETERS

 doc      (IN)-  DOMDocument
 fileName (IN)-  File to write to

RETURNS

Nothing

PROCEDURE

writeToBuffer(doc DOMDocument, buffer IN OUT VARCHAR2);

PURPOSE

Writes XML document to specified buffer using the database character set

SYNTAX

 PROCEDURE writeToBuffer(doc DOMDocument, buffer IN OUT VARCHAR2); 

PARAMETERS

 doc      (IN)-  DOMDocument
 buffer   (OUT)- buffer to write to

RETURNS

Nothing

PROCEDURE

writeToClob(doc DOMDocument, cl IN OUT CLOB);

PURPOSE

Writes XML document to specified clob using the database character set

SYNTAX

 PROCEDURE writeToClob(doc DOMDocument, cl IN OUT CLOB); 

PARAMETERS

 doc      (IN)-  DOMDocument
 cl      (OUT)-  CLOB to write to

RETURNS

Nothing

PROCEDURE

writeToFile(doc DOMDocument, fileName VARCHAR2, charset VARCHAR2);

PURPOSE

Writes XML document to specified file using the given character set

SYNTAX

 PROCEDURE writeToFile(doc DOMDocument, fileName VARCHAR2, charset VARCHAR2); 

PARAMETERS

 doc      (IN)-  DOMDocument
 fileName (IN)-  File to write to
 charset  (IN)-  Character set

RETURNS

Nothing

PROCEDURE

writeToBuffer(doc DOMDocument, buffer IN OUT VARCHAR2, charset VARCHAR2);

PURPOSE

Writes XML document to specified buffer using the given character set

SYNTAX

 PROCEDURE writeToBuffer(doc DOMDocument, buffer IN OUT VARCHAR2, charset 
VARCHAR2); 

PARAMETERS

 doc      (IN)-  DOMDocument
 buffer   (OUT)- buffer to write to
 charset  (IN)-  Character set

RETURNS

Nothing

PROCEDURE

writeToClob(doc DOMDocument, cl IN OUT CLOB, charset VARCHAR2);

PURPOSE

Writes XML document to specified clob using the given character set

SYNTAX

 PROCEDURE writeToClob(doc DOMDocument, cl IN OUT CLOB, charset VARCHAR2); 

PARAMETERS

 doc      (IN)-  DOMDocument
 cl      (OUT)-  CLOB to write to
 charset  (IN)-  Character set

RETURNS

Nothing

PROCEDURE

writeExternalDTDToFile(doc DOMDocument, fileName VARCHAR2);

PURPOSE

Writes an external DTD to specified file using the database character set

SYNTAX

 PROCEDURE writeExternalDTDToFile(doc DOMDocument, fileName VARCHAR2); 

PARAMETERS

 doc      (IN)-  DOMDocument
 fileName (IN)-  File to write to

RETURNS

Nothing

PROCEDURE

writeExternalDTDToBuffer(doc DOMDocument, buffer IN OUT VARCHAR2);

PURPOSE

Writes an external DTD to specified buffer using the database character set

SYNTAX

 PROCEDURE writeExternalDTDToBuffer(doc DOMDocument, buffer IN OUT VARCHAR2); 

PARAMETERS

 doc      (IN)-  DOMDocument
 buffer   (OUT)- buffer to write to

RETURNS

Nothing

PROCEDURE

writeExternalDTDToClob(doc DOMDocument, cl IN OUT CLOB);

PURPOSE

Writes an external DTD to specified clob using the database character set

SYNTAX

 PROCEDURE writeExternalDTDToClob(doc DOMDocument, cl IN OUT CLOB); 

PARAMETERS

 doc      (IN)-  DOMDocument
 cl      (OUT)-  CLOB to write to

RETURNS

Nothing

PROCEDURE

writeExternalDTDToFile(doc DOMDocument, fileName VARCHAR2, charset VARCHAR2);

PURPOSE

Writes an external DTD to specified file using the given character set

SYNTAX

 PROCEDURE writeExternalDTDToFile(doc DOMDocument, fileName VARCHAR2, charset 
VARCHAR2); 

PARAMETERS

 doc      (IN)-  DOMDocument
 fileName (IN)-  File to write to
 charset  (IN)-  Character set

RETURNS

Nothing

PROCEDURE

writeExternalDTDToBuffer(doc DOMDocument, buffer IN OUT VARCHAR2, charset VARCHAR2);

PURPOSE

Writes an external DTD to specified buffer using the given character set

SYNTAX

 PROCEDURE writeExternalDTDToBuffer(doc DOMDocument, buffer IN OUT VARCHAR2, 
charset VARCHAR2); 

PARAMETERS

 doc      (IN)-  DOMDocument
 buffer   (OUT)- buffer to write to
 charset  (IN)-  Character set

RETURNS

Nothing

PROCEDURE

writeExternalDTDToClob(doc DOMDocument, cl IN OUT CLOB, charset VARCHAR2);

PURPOSE

Writes an external DTD to specified clob using the given character set

SYNTAX

 PROCEDURE writeExternalDTDToClob(doc DOMDocument, cl IN OUT CLOB, charset 
VARCHAR2); 

PARAMETERS

 doc      (IN)-  DOMDocument
 cl      (OUT)-  CLOB to write to
 charset  (IN)-  Character set

RETURNS

Nothing


Interface org.w3c.dom.Attr

Public interface Attr extends Node.

The Attr interface represents an attribute in an Element object. Typically the allowable values for the attribute are defined in a document type definition.

Attr objects inherit the Node interface, but since they are not actually child nodes of the element they describe, the DOM does not consider them part of the document tree. Thus, the Node attributes parentNode, previousSibling, and nextSibling have a null value for Attr objects. The DOM takes the view that attributes are properties of elements rather than having a separate identity from the elements they are associated with; this should make it more efficient to implement such features as default attributes associated with all elements of a given type. Furthermore, Attr nodes may not be immediate children of a DocumentFragment. However, they can be associated with Element nodes contained within a DocumentFragment. In short, users of DOM need to be aware that Attr nodes have some things in common with other objects inheriting the Node interface, but they also are quite distinct. The attribute's effective value is determined as follows: if this attribute has been explicitly assigned any value, that value is the attribute's effective value; otherwise, if there is a declaration for this attribute, and that declaration includes a default value, then that default value is the attribute's effective value; otherwise, the attribute does not exist on this element in the structure model until it has been explicitly added. Note that the nodeValue attribute on the Attr instance can also be used to retrieve the string version of the attribute's value(s). In XML, where the value of an attribute can contain entity references, the child nodes of the Attr node provide a representation in which entity references are not expanded. These child nodes may be either Text or EntityReference nodes. Because the attribute type may be unknown, there are no tokenized attribute values.

getName

Returns the name of this attribute.

getSpecified

If this attribute was explicitly given a value in the original document, this is true; otherwise, it is false.

getValue

On retrieval, the value of the attribute is returned as a string.

setValue

Enter an appropriate value.


Abstracts

getName

 public abstract String getName()

Returns the name of this attribute.

getSpecified

 public abstract boolean getSpecified()

If this attribute was explicitly given a value in the original document, this is true; otherwise, it is false. Note that the implementation is in charge of this attribute, not the user. If the user changes the value of the attribute (even if it ends up having the same value as the default value) then the specified flag is automatically flipped to true. To re-specify the attribute as the default value from the DTD, the user must delete the attribute. The implementation will then make a new attribute available with specified set to false and the default value (if one exists).
In summary: If the attribute has an assigned value in the document then specified is true, and the value is the assigned value. If the attribute has no assigned value in the document and has a default value in the DTD, then specified is false, and the value is the default value in the DTD. If the attribute has no assigned value in the document and has a value of #IMPLIED in the DTD, then the attribute does not appear in the structure model of the document.

getValue

 public abstract String getValue()

On retrieval, the value of the attribute is returned as a string. Character and general entity references are replaced with their values.
On setting, this creates a Text node with the unparsed contents of the string.

setValue

 public abstract void setValue(String value)

Interface org.w3c.dom.CDATASection

Public interface CDATASection extends Text.

CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup. The only delimiter that is recognized in a CDATA section is the "]]>" string that ends the CDATA section. CDATA sections can not be nested. The primary purpose is for including material such as XML fragments, without needing to escape all the delimiters.

The DOMString attribute of the Text node holds the text that is contained by the CDATA section. Note that this may contain characters that need to be escaped outside of CDATA sections and that, depending on the character encoding ("charset") chosen for serialization, it may be impossible to write out some characters as part of a CDATA section.

The CDATASection interface inherits the CharacterData interface through the Text interface. Adjacent CDATASections nodes are not merged by use of the Element.normalize() method.


Interface org.w3c.dom.CharacterData

Public interface CharacterData extends Node.

The CharacterData interface extends Node with a set of attributes and methods for accessing character data in the DOM. For clarity this set is defined here rather than on each object that uses these attributes and methods. No DOM objects correspond directly to CharacterData, though Text and others do inherit the interface from it. All offsets in this interface start from 0.

appendData(String)

Append the string to the end of the character data of the node.

DeleteData(int, int)

Remove a range of characters from the node.

getData()

The character data of the node that implements this interface.

getLength()

The number of characters that are available through data and the substringData method below.

insertData(int, String)

Insert a string at the specified character offset.

replaceData(int, int, String)

Replace the characters starting at the specified character offset with the specified string.

setData(String)

substringData(int, int)

Extracts a range of data from the node.

getData

 public abstract String getData() throws DOMExecption

The character data of the node that implements this interface. The DOM implementation may not put arbitrary limits on the amount of data that may be stored in a CharacterData node. However, implementation limits may mean that the entirety of a node's data may not fit into a single DOMString. In such cases, the user may call substringData to retrieve the data in appropriately sized pieces.

THROWS

DOMExecption

NO_MODIFICATION_ALLOWED_ERR: Raised when the node is read only.

THROWS

DOMExecption

DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.


Abstracts

setData

 public abstract void setData(String data) throws DOMExecption

getLength

 public abstract int getLength()

The number of characters that are available through data and the substringData method below. This may have the value zero, i.e., CharacterData nodes may be empty.

substringData

 public abstract String substringData(int offset,
                                      int count) throws DOMExecption

Extracts a range of data from the node.

PARAMETERS

offset - Start offset of substring to extract.

count - The number of characters to extract.

RETURNS

The specified substring. If the sum of offset and count exceeds the length, then all characters to the end of the data are returned.

THROWS

DOMExecption

INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of characters in data, or if the specified count is negative.
DOMSTRING_SIZE_ERR: Raised if the specified range of text does not fit into a DOMString.

appendData

 public abstract void appendData(String arg) throws DOMExecption

Append the string to the end of the character data of the node. Upon success, data provides access to the concatenation of data and the DOMString specified.

PARAMETERS

arg - The DOMString to append.

THROWS

DOMExecption

NO_MODIFICATION_ALLOWED_ERR: Raised if this node is read only.

insertData

 public abstract void insertData(int offset,
                                 String arg) throws DOMExecption

Insert a string at the specified character offset.

PARAMETERS

offset - The character offset at which to insert.

arg - The DOMString to insert.

THROWS

DOMExecption

INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of characters in data.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is read only.

deleteData

 public abstract void deleteData(int offset,
                                 int count) throws DOMExecption

Remove a range of characters from the node. Upon success, data and length reflect the change.

PARAMETERS

offset - The offset from which to remove characters.

count - The number of characters to delete. If the sum of offset and count exceeds length then all characters from offset to the end of the data are deleted.

THROWS

DOMExecption

INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of characters in data, or if the specified count is negative.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is read only.

replaceData

 public abstract void replaceData(int offset,
                                  int count,
                                  String arg) throws DOMExecption

Replace the characters starting at the specified character offset with the specified string.

PARAMETERS

offset - The offset from which to start replacing.

count - The number of characters to replace. If the sum of offset and count exceeds length , then all characters to the end of the data are replaced (i.e., the effect is the same as a remove method call with the same range, followed by an append method invocation).

arg - The DOMString with which the range must be replaced.

THROWS

DOMExecption

INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of characters in data, or if the specified count is negative.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is read only.


Interface org.w3c.dom.Comment

Public interface Comment extends Node.

This represents the content of a comment, i.e., all the characters between the starting '<!--' and ending '-->'. Note that this is the definition of a comment in XML, and, in practice, HTML, although some HTML tools may implement the full SGML comment structure.


Interface org.w3c.dom.Document

Public interface Document extends Node.

The Document interface represents the entire HTML or XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data.

Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects. The Node objects created have a ownerDocument attribute which associates them with the Document within whose context they were created.

createAttribute(String)

Creates an Attr of the given name.

createCDATASection(String)

Creates a CDATASection node whose value is the specified string.

createComment(String)

Creates a Comment node given the specified string.

createDocumentFragment()

Creates an empty DocumentFragment object.

createElement(String)

Creates an element of the type specified.

createEntityReference(String)

Creates an EntityReference object.

createProcessingInstruction(String, String)

Creates a ProcessingInstruction node given the specified name and data strings.

createTextNode(String)

Creates a Text node given the specified string.

getDocType()

The Document Type Declaration (see DocumentType) associated with this document.

getDocumentElement()

This is a convenience attribute that allows direct access to the child node that is the root element of the document.

getElementsByTagName(String)

Returns a NodeList of all the Elements with a given tag name in the order in which they would be encountered in a preorder traversal of the Document tree.

getImplementation()

The DOMImplementation object that handles this document.


Abstracts

getDoctype

 public abstract  getDoctype()

The Document Type Declaration (see DocumentType) associated with this document. For HTML documents as well as XML documents without a document type declaration this returns null. The DOM Level 1 does not support editing the Document Type Declaration, therefore docType cannot be altered in any way.

getImplementation

 public abstract  getImplementation()

The DOMImplementation object that handles this document. A DOM application may use objects from multiple implementations.

getDocumentElement

 public abstract  getDocumentElement()

This is a convenience attribute that allows direct access to the child node that is the root element of the document. For HTML documents, this is the element with the tagName "HTML".

createElement

 public abstract  createElement(String tagName) throws DOMExecption

Creates an element of the type specified. Note that the instance returned implements the Element interface, so attributes can be specified directly on the returned object.

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 Element object.

THROWS

DOMExecption

INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.


Abstracts

createDocumentFragment

 public abstract  createDocumentFragment()

Creates an empty DocumentFragment object.

RETURNS

A new DocumentFragment.

createTextNode

 public abstract  createTextNode(String data)

Creates a Text node given the specified string.

PARAMETERS

data - The data for the node.

RETURNS

The new Text object.

createComment

 public abstract  createComment(String data)

Creates a Comment node given the specified string.

PARAMETERS

data - The data for the node.

RETURNS

The new Comment object.

createCDATASection

 public abstract  createCDATASection(String data) throws DOMExecption

Creates a CDATASection node whose value is the specified string.

PARAMETERS

data - The data for the CDATASection contents.

RETURNS

The new CDATASection object.

THROWS

DOMExecption

NOT_SUPPORTED_ERR: Raised if this document is an HTML document.

createProcessingInstruction

 public abstract  createProcessingInstruction(String target,String data) throws 
DOMExecption

Creates a ProcessingInstruction node given the specified name and data strings.

PARAMETERS

target - The target part of the processing instruction.

data - The data for the node.

RETURNS

The new ProcessingInstruction object.

THROWS

DOMExecption

INVALID_CHARACTER_ERR: Raised if an invalid character is specified.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.

createAttribute

 public abstract  createAttribute(String name) throws DOMExecption

Creates an Attr of the given name. Note that the Attr instance can then be set on an Element using the setAttribute method.

PARAMETERS

name - The name of the attribute.

RETURNS

A new Attr object.

THROWS

DOMExecption

INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.

createEntityReference

 public abstract  createEntityReference(String name) throws DOMExecption

Creates an EntityReference object.

PARAMETERS

name - The name of the entity to reference.

RETURNS

The new EntityReference object.

THROWS

INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.

getElementsByTagName

 public abstract  getElementsByTagName(String tagname)

Returns a NodeList of all the Elements with a given tag name in the order in which they would be encountered in a preorder traversal of the Document tree.

PARAMETERS

tagname - The name of the tag to match on. The special value "*" matches all tags.

RETURNS

A new NodeList object containing all the matched Elements.


Interface org.w3c.dom.DocumentFragment

Public interface DocumentFragment extends Node.

DocumentFragment is a "lightweight" or "minimal" Document object. It is very common to want to be able to extract a portion of a document's tree or to create a new fragment of a document. Imagine implementing a user command like cut or rearranging a document by moving fragments around. It is desirable to have an object which can hold such fragments and it is quite natural to use a Node for this purpose. While it is true that a Document object could fulfil this role, a Document object can potentially be a heavyweight object, depending on the underlying implementation. What is really needed for this is a very lightweight object. DocumentFragment is such an object.

Furthermore, various operations -- such as inserting nodes as children of another Node -- may take DocumentFragment objects as arguments; this results in all the child nodes of the DocumentFragment being moved to the child list of this node.

The children of a DocumentFragment node are zero or more nodes representing the tops of any sub-trees defining the structure of the document. DocumentFragment nodes do not need to be well-formed XML documents (although they do need to follow the rules imposed upon well-formed XML parsed entities, which can have multiple top nodes). For example, a DocumentFragment might have only one child and that child node could be a Text node. Such a structure model represents neither an HTML document nor a well-formed XML document.

When a DocumentFragment is inserted into a Document (or indeed any other Node that may take children) the children of the DocumentFragment and not the DocumentFragment itself are inserted into the Node. This makes the DocumentFragment very useful when the user wishes to create nodes that are siblings; the DocumentFragment acts as the parent of these nodes so that the user can use the standard methods from the Node interface, such as insertBefore() and appendChild().


Interface org.w3c.dom.DocumentType

Public interface DocumentType extends Node.

Each Document has a doctype attribute whose value is either null or a DocumentType object. The DocumentType interface in the DOM Level 1 Core provides an interface to the list of entities that are defined for the document, and little else because the effect of namespaces and the various XML scheme efforts on DTD representation are not clearly understood as of this writing.

The DOM Level 1 doesn't support editing DocumentType nodes.

getEntities()

A NamedNodeMap containing the general entities, both external and internal, declared in the DTD.

getName()

The name of DTD; i.e., the name immediately following the DOCTYPE keyword.

getNotations()

A NamedNodeMap containing the notations declared in the DTD.


Abstracts

getName

 public abstract String getName()

The name of DTD; i.e., the name immediately following the DOCTYPE keyword.

getEntities

 public abstract  getEntities()

A NamedNodeMap containing the general entities, both external and internal, declared in the DTD. Duplicates are discarded. For example in:<!DOCTYPE ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar "bar"> <!ENTITY % baz "baz">]> <ex/> the interface provides access to foo and bar but not baz. Every node in this map also implements the Entity interface.
The DOM Level 1 does not support editing entities, therefore entities cannot be altered in any way.

getNotations

 public abstract  getNotations()

A NamedNodeMap containing the notations declared in the DTD. Duplicates are discarded. Every node in this map also implements the Notation interface.
The DOM Level 1 does not support editing notations, therefore notations cannot be altered in any way.


Class org.w3c.dom.DOMException

java.lang.Object
   |
   +---java.lang.Throwable
           |
           +---java.lang.Exception
                   |
                   +---java.lang.RuntimeException
                           |
                           +---org.w3c.dom.DOMException

Public abstract class DOMException extends RuntimeException.

DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impossible to perform (either for logical reasons, because data is lost, or because the implementation has become unstable). In general, DOM methods return specific error values in ordinary processing situation, such as out-of-bound errors when using NodeList.

Implementations may raise other exceptions under other circumstances. For example, implementations may raise an implementation-dependent exception if a null argument is passed.

Some languages and object systems do not support the concept of exceptions. For such systems, error conditions may be indicated using native error reporting mechanisms. For some bindings, for example, methods may return error codes similar to those listed in the corresponding method descriptions.

INDEX_SIZE_ERR

public static final short INDEX_SIZE_ERR

DOMSTRING_SIZE_ERR

public static final short DOMSTRING_SIZE_ERR

HIERARCHY_REQUEST_ERR

public static final short HIERARCHY_REQUEST_ERR

WRONG_DOCUMENT_ERR

public static final short WRONG_DOCUMENT_ERR

INVALID_CHARACTER_ERR

public static final short INVALID_CHARACTER_ERR

NO_DATA_ALLOWED_ERR

public static final short NO_DATA_ALLOWED_ERR

NO_MODIFICATION_ALLOWED_ERR

public static final short NO_MODIFICATION_ALLOWED_ERR

NOT_FOUND_ERR

public static final short NOT_FOUND_ERR

NOT_SUPPORTED_ERR

public static final short NOT_SUPPORTED_ERR

INUSE_ATTRIBUTE_ERR

public static final short INUSE_ATTRIBUTE_ERR

DOMException

 public DOMException(short code,
                     String message)

Interface org.w3c.dom.DOMImplementation

Public interface DOMImplementation

The DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.

The DOM Level 1 does not specify a way of creating a document instance, and hence document creation is an operation specific to an implementation. Future Levels of the DOM specification are expected to provide methods for creating documents directly.

hasFeature(String, String)

Tests if the DOM implementation implements a specific feature.


Abstracts

hasFeature

 public abstract boolean hasFeature(String feature,
                                    String version)

Test if the DOM implementation implements a specific feature.

PARAMETERS

feature - The package name of the feature to test. In Level 1, the legal values are "HTML" and "XML" (case-insensitive).

version - This is the version number of the package name to test. In Level 1, this is the string "1.0". If the version is not specified, supporting any version of the feature will cause the method to return true.

RETURNS

true if the feature is implemented in the specified version, false otherwise.


Interface org.w3c.dom.Element

Public interface Element extends Node.

By far the vast majority of objects (apart from text) that authors encounter when traversing a document are Element nodes. Assume the following XML document:<elementExample id="demo"> <subelement1/> <subelement2><subsubelement/></subelement2> </elementExample>

When represented using DOM, the top node is an Element node for "elementExample", which contains two child Element nodes, one for "subelement1" and one for "subelement2". "subelement1" contains no child nodes.

Elements may have attributes associated with them; since the Element interface inherits from Node, the generic Node interface method getAttributes may be used to retrieve the set of all attributes for an element. There are methods on the Element interface to retrieve either an Attr object by name or an attribute value by name. In XML, where an attribute value may contain entity references, an Attr object should be retrieved to examine the possibly fairly complex sub-tree representing the attribute value. On the other hand, in HTML, where all attributes have simple string values, methods to directly access an attribute value can safely be used as a convenience.

getAttribute(String)

Retrieves an attribute value by name.

getAttributeNode(String)

Retrieves an Attr node by name.

getElementsByTagName(String)

Returns a NodeList of all descendant elements with a given tag name, in the order in which they would be encountered in a preorder traversal of the Element tree.

getTagName()

The name of the element.

normalize()

Puts all Text nodes in the full depth of the sub-tree underneath this Element into a "normal" form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are no adjacent Text nodes.

removeAttribute(String)

Removes an attribute by name.

removeAttributeNode(Attr)

Removes the specified attribute.

setAttribute(String, String)

Adds a new attribute.

setAttributeNode(Attr)

Adds a new attribute.


Abstracts

getTagName

 public abstract String getTagName()

The name of the element. For example, in: <elementExample id="demo"> ... </elementExample> , tagName has the value "elementExample". Note that this is case-preserving in XML, as are all of the operations of the DOM. The HTML DOM returns the tagName of an HTML element in the canonical uppercase form, regardless of the case in the source HTML document.

getAttribute

 public abstract String getAttribute(String name)

Retrieves an attribute value by name.

PARAMETERS

name - The name of the attribute to retrieve.

RETURNS

The Attr value as a string, or the empty string if that attribute does not have a specified or default value.

setAttribute

 public abstract void setAttribute(String name,
                                   String value) throws DOMException

Adds a new attribute. If an attribute with that name is already present in the element, its value is changed to be that of the value parameter. This value is a simple string, it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out. In order to assign an attribute value that contains entity references, the user must create an Attr node plus any Text and EntityReference nodes, build the appropriate subtree, and use setAttributeNode to assign it as the value of an attribute.

PARAMETERS

name - The name of the attribute to create or alter.

value - Value to set in string form.

THROWS

DOMException

INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is read only.

removeAttribute

 public abstract void removeAttribute(String name) throws DOMException

Removes an attribute by name. If the removed attribute has a default value it is immediately replaced.

PARAMETERS

name - The name of the attribute to remove.

THROWS

DOMException

NO_MODIFICATION_ALLOWED_ERR: Raised if this node is read only.

getAttributeNode

 public abstract Attr getAttributeNode(String name)

Retrieves an Attr node by name.

PARAMETERS

name - The name of the attribute to retrieve.

RETURNS

The Attr node with the specified attribute name or null if there is no such attribute.


Abstracts

setAttributeNode

 public abstract  Attr setAttributeNode(Attr newAttr) throws 

Adds a new attribute. If an attribute with that name is already present in the element, it is replaced by the new one.

PARAMETERS

newAttr - The Attr node to add to the attribute list.

RETURNS

If the newAttr attribute replaces an existing attribute with the same name, the previously existing Attr node is returned, otherwise null is returned.

THROWS

DOMException

WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is read only.
INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.

removeAttributeNode

 public abstract Attr removeAttributeNode(Attr oldAttr) throws DOMException

Removes the specified attribute.

PARAMETERS

oldAttr - The Attr node to remove from the attribute list. If the removed Attr has a default value it is immediately replaced.

RETURNS

The Attr node that was removed.

THROWS

DOMException

NO_MODIFICATION_ALLOWED_ERR: Raised if this node is read only.
NOT_FOUND_ERR: Raised if oldAttr is not an attribute of the element.

getElementsByTagName

 public abstract  getElementsByTagName(String name)

Returns a NodeList of all descendant elements with a given tag name, in the order in which they would be encountered in a preorder traversal of the Element tree.

PARAMETERS

name - The name of the tag to match on. The special value "*" matches all tags.

RETURNS

A list of matching Element nodes.

normalize

 public abstract void normalize()

Puts all Text nodes in the full depth of the sub-tree underneath this Element into a "normal" form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are no adjacent Text nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particular document tree structure are to be used.


Interface org.w3c.dom.Entity

Public interface Entity extends Node.

This interface represents an entity, either parsed or unparsed, in an XML document. Note that this models the entity itself not the entity declaration. Entity declaration modeling has been left for a later Level of the DOM specification.

The nodeName attribute that is inherited from Node contains the name of the entity.

An XML processor may choose to completely expand entities before the structure model is passed to the DOM; in this case there will be no EntityReference nodes in the document tree.

XML does not mandate that a non-validating XML processor read and process entity declarations made in the external subset or declared in external parameter entities. This means that parsed entities declared in the external subset need not be expanded by some classes of applications, and that the replacement value of the entity may not be available. When the replacement value is available, the corresponding Entity node's child list represents the structure of that replacement text. Otherwise, the child list is empty.

The resolution of the children of the Entity (the replacement value) may be lazily evaluated; actions by the user (such as calling the childNodes method on the Entity Node) are assumed to trigger the evaluation.

The DOM Level 1 does not support editing Entity nodes; if a user wants to make changes to the contents of an Entity, every related EntityReference node has to be replaced in the structure model by a clone of the Entity's contents, and then the desired changes must be made to each of those clones instead. All the descendants of an Entity node are read only.

An Entity node does not have any parent.

getNotationName()

For unparsed entities, the name of the notation for the entity.

getPublicId()

The public identifier associated with the entity, if specified.

getSystemId()

The system identifier associated with the entity, if specified.


Abstracts

getPublicId

 public abstract String getPublicId()

The public identifier associated with the entity, if specified. If the public identifier was not specified, this is null.

getSystemId

 public abstract String getSystemId()

The system identifier associated with the entity, if specified. If the system identifier was not specified, this is null.

getNotationName

 public abstract String getNotationName()

For unparsed entities, the name of the notation for the entity. For parsed entities, this is null.


Interface org.w3c.dom.EntityReference

Public interface EntityReference extends Node.

EntityReference objects may be inserted into the structure model when an entity reference is in the source document, or when the user wishes to insert an entity reference. Note that character references and references to predefined entities are considered to be expanded by the HTML or XML processor so that characters are represented by their Unicode equivalent rather than by an entity reference. Moreover, the XML processor may completely expand references to entities while building the structure model, instead of providing EntityReference objects. If it does provide such objects, then for a given EntityReference node, it may be that there is no Entity node representing the referenced entity; but if such an Entity exists, then the child list of the EntityReference node is the same as that of the Entity node. As with the Entity node, all descendants of the EntityReference are read only.

The resolution of the children of the EntityReference (the replacement value of the referenced Entity) may be lazily evaluated; actions by the user (such as calling the childNodes method on the EntityReference node) are assumed to trigger the evaluation.


Interface org.w3c.dom.NamedNodeMap

Public interface NamedNodeMap

Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes.

getLength()

The number of nodes in the map.

getNamedItem(String)

Retrieves a node specified by name.

item(int)

Returns the indexth item in the map.

removeNamedItem(String)

Removes a node specified by name.

setNamedItem(Node)

Adds a node using its nodeName attribute.


Abstracts

getNamedItem

 public abstract  getNamedItem(String name)

Retrieves a node specified by name.

PARAMETERS

name - Name of a node to retrieve.

RETURNS

A Node (of any type) with the specified name, or null if the specified name did not identify any node in the map.

setNamedItem

 public abstract Node setNamedItem(Node arg) throws DOMException

Adds a node using its nodeName attribute.
As the nodeName attribute is used to derive the name which the node must be stored under, multiple nodes of certain types (those that have a "special" string value) cannot be stored as the names would clash. This is seen as preferable to allowing nodes to be aliased.

PARAMETERS

arg - A node to store in a named node map. The node will later be accessible using the value of the nodeName attribute of the node. If a node with that name is already present in the map, it is replaced by the new one.

RETURNS

If the new Node replaces an existing node with the same name the previously existing Node is returned, otherwise null is returned.

THROWS

DOMException 

WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created the NamedNodeMap.
NO_MODIFICATION_ALLOWED_ERR: Raised if this NamedNodeMap is read only.
INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.

removeNamedItem

 public abstract Node removeNamedItem(String name) throws DOMException

Removes a node specified by name. If the removed node is an Attr with a default value it is immediately replaced.

PARAMETERS

name - The name of a node to remove.

RETURNS

The node removed from the map or null if no node with such a name exists.

THROWS

DOMException

NOT_FOUND_ERR: Raised if there is no node named name in the map.

item

 public abstract Node item(int index)

Returns the indexth item in the map. If index is greater than or equal to the number of nodes in the map, this returns null.

PARAMETERS

index - Index into the map.

RETURNS

The node at the indexth position in the NamedNodeMap, or null if that is not a valid index.

getLength

 public abstract int getLength()

The number of nodes in the map. The range of valid child node indices is 0 to length-1 inclusive.


Interface org.w3c.dom.Node

Public interface Node

The Node interface is the primary datatype for the entire Document Object Model. It represents a single node in the document tree. While all objects implementing the Node interface expose methods for dealing with children, not all objects implementing the Node interface may have children. For example, Text nodes may not have children, and adding children to such nodes results in a DOMException being raised.

The attributes nodeName, nodeValue and attributes are included as a mechanism to get at node information without casting down to the specific derived interface. In cases where there is no obvious mapping of these attributes for a specific nodeType (e.g., nodeValue for an Element or attributes for a Comment), this returns null. Note that the specialized interfaces may contain additional and more convenient mechanisms to get and set the relevant information.

appendChild(Node)

Adds the node newChild to the end of the list of children of this node.

cloneNode(boolean)

Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.

getAttributes()

A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.

getChildNodes()

A NodeList that contains all children of this node.

getFirstChild()

The first child of this node.

getLastChild()

The last child of this node.

getNextSibling()

The node immediately following this node.

getNodeName()

The name of this node, depending on its type; see the table above.

getNodeType()

A code representing the type of the underlying object, as defined above.

getNodeValue()

The value of this node, depending on its type; see the table above.

getOwnerDocument()

The Document object associated with this node.

getParentNode()

The parent of this node.

getPreviousSibling()

The node immediately preceding this node.

hasChildNodes()

This is a convenience method to allow easy determination of whether a node has any children.

insertBefore(Node, Node)

Inserts the node newChild before the existing child node refChild.

removeChild(Node)

Removes the child node indicated by oldChild from the list of children, and returns it.

replaceChild(Node, Node)

Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.

setNodeValue(String)

ELEMENT_NODE

 public static final short ELEMENT_NODE

ATTRIBUTE_NODE

 public static final short ATTRIBUTE_NODE

TEXT_NODE

 public static final short TEXT_NODE

CDATA_SECTION_NODE

 public static final short CDATA_SECTION_NODE

ENTITY_REFERENCE_NODE

 public static final short ENTITY_REFERENCE_NODE

ENTITY_NODE

 public static final short ENTITY_NODE

PROCESSING_INSTRUCTION_NODE

 public static final short PROCESSING_INSTRUCTION_NODE

COMMENT_NODE

 public static final short COMMENT_NODE

DOCUMENT_NODE

 public static final short DOCUMENT_NODE

DOCUMENT_TYPE_NODE

 public static final short DOCUMENT_TYPE_NODE

DOCUMENT_FRAGMENT_NODE

 public static final short DOCUMENT_FRAGMENT_NODE

NOTATION_NODE

 public static final short NOTATION_NODE

getNodeName

 public abstract String getNodeName()

The name of this node, depending on its type; see the table above.

getNodeValue

 public abstract String getNodeValue() throws 

The value of this node, depending on its type; see the table above.

THROWS

DOMException

NO_MODIFICATION_ALLOWED_ERR: Raised when the node is read only.

THROWS

DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

setNodeValue

 public abstract void setNodeValue(String nodeValue) throws DOMException

getNodeType

 public abstract short getNodeType()

A code representing the type of the underlying object, as defined above.

getParentNode

 public abstract Node getParentNode()

The parent of this node. All nodes, except Document, DocumentFragment, and Attr 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.

getChildNodes

 public abstract  NodeList getChildNodes()

A NodeList that contains all children of this node. If there are no children, this is a NodeList containing no nodes. The content of the returned NodeList is "live" in the sense that, for instance, changes to the children of the node object that it was created from are immediately reflected in the nodes returned by the NodeList accessors; it is not a static snapshot of the content of the node. This is true for every NodeList, including the ones returned by the getElementsByTagName method.

getFirstChild

 public abstract Node getFirstChild()

The first child of this node. If there is no such node, this returns null.

getLastChild

 public abstract Node getLastChild()

The last child of this node. If there is no such node, this returns null.

getPreviousSibling

 public abstract Node getPreviousSibling()

The node immediately preceding this node. If there is no such node, this returns null.

getNextSibling

 public abstract Node getNextSibling()

The node immediately following this node. If there is no such node, this returns null.

getAttributes

 public abstract NamedNodeMap getAttributes()

A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.

getOwnerDocument

 public abstract Document getOwnerDocument()

The Document object associated with this node. This is also the Document object used to create new nodes. When this node is a Document this is null.

insertBefore

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

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.

PARAMETERS

newChild - The node to insert.

refChild - The reference node, i.e., the node before which the new node must be inserted.

RETURNS

The node being 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 read only.
NOT_FOUND_ERR: Raised if refChild is not a child of this node.

replaceChild

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

Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. If the newChild is already in the tree, it is first removed.

PARAMETERS

newChild - The new node to put in the child list.

oldChild - The node being replaced in the list.

RETURNS

The node 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 it 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 is read only.
NOT_FOUND_ERR: Raised if oldChild is not a child of this node.

removeChild

 public abstract Node removeChild(Node oldChild) throws DOMException

Removes the child node indicated by oldChild from the list of children, and returns it.

PARAMETERS

oldChild - The node being removed.

RETURNS

The node removed.

THROWS

DOMException

NO_MODIFICATION_ALLOWED_ERR: Raised if this node is read only.
NOT_FOUND_ERR: Raised if oldChild is not a child of this node.

appendChild

 public abstract  appendChild( newChild) throws DOMException

Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed.

PARAMETERSPARAMETERS

newChild - 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 added.

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 read only.

hasChildNodes

 public abstract boolean hasChildNodes()

This is a convenience method to allow easy determination of whether a node has any children.

RETURNS

true if the node has any children, false if the node has no children.

cloneNode

 public abstract Node cloneNode(boolean deep)

Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent ( parentNode returns null.).
Cloning 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 any other type of node simply returns a copy of this node.

PARAMETERS

deep - If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).

RETURNS

The duplicate node.


Interface org.w3c.dom.NodeList

Public interface NodeList

The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented.

The items in the NodeList are accessible via an integral index, starting from 0.

getLenth()

The number of nodes in the list.

item(int)

Returns the indexth item in the collection.


Abstracts

item

 public abstract Node item(int index)

Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.

PARAMETERS

index - Index into the collection.

RETURNS

The node at the indexth position in the NodeList, or null if that is not a valid index.

getLength

 public abstract int getLength()

The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.


Interface org.w3c.dom.Notation

Public interface Notation extends Node.

This interface represents a notation declared in the DTD. A notation either declares, by name, the format of an unparsed entity (see section 4.7 of the XML 1.0 specification), or is used for formal declaration of Processing Instruction targets (see section 2.6 of the XML 1.0 specification). The nodeName attribute inherited from Node is set to the declared name of the notation.

The DOM Level 1 does not support editing Notation nodes; they are therefore read only.

A Notation node does not have any parent.

getPublicId()

The public identifier of this notation.

getSystemId()

The system identifier of this notation.


Abstracts

getPublicId

 public abstract String getPublicId()

The public identifier of this notation. If the public identifier was not specified, this is null.

getSystemId

 public abstract String getSystemId()

The system identifier of this notation. If the system identifier was not specified, this is null.


Interface org.w3c.dom.ProcessingInstruction

Public interface ProcessingInstruction extends Node.

The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to keep processor-specific information in the text of the document.

getData()

The content of this processing instruction.

getTarget()

The target of this processing instruction.

setData(String)


Abstracts

getTarget

 public abstract String getTarget()

The target of this processing instruction. XML defines this as being the first token following the markup that begins the processing instruction.

getData

 public abstract String getData()

The content of this processing instruction. This is from the first non white space character after the target to the character immediately preceding the ?>.

THROWS

DOMException

NO_MODIFICATION_ALLOWED_ERR: Raised when the node is read only.

setData

 public abstract void setData(String data) throws

Interface org.w3c.dom.Text

Public interface Text extends CharacterData.

The Text interface represents the textual content (termed character data in XML) of an Element or Attr. If there is no markup inside an element's content, the text is contained in a single object implementing the Text interface that is the only child of the element. If there is markup, it is parsed into a list of elements and Text nodes that form the list of children of the element.

When a document is first made available via the DOM, there is only one Text node for each block of text. Users may create adjacent Text nodes that represent the contents of a given element without any intervening markup, but should be aware that there is no way to represent the separations between these nodes in XML or HTML, so they will not (in general) persist between DOM editing sessions. The normalize() method on Element merges any such adjacent Text objects into a single node for each block of text; this is recommended before employing operations that depend on a particular document structure, such as navigation with XPointers.

splitText(int)

Breaks this Text node into two Text nodes at the specified offset, keeping both in the tree as siblings.


Abstracts

splitText

 public abstract Text splitText(int offset) throws DOMException

Breaks this Text node into two Text nodes at the specified offset, keeping both in the tree as siblings. This node then only contains all the content up to the offset point. And a new Text node, which is inserted as the next sibling of this node, contains all the content at and after the offset point.

PARAMETERS

offset - The offset at which to split, starting from 0.

RETURNS

The new Text node.

THROWS

DOMException

INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of characters in data.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is read only.


Go to previous page Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index