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

1
Package oracle.xml.parser.v2


Description

Class Summary 

 

Interfaces 

 

NSName 

This interface provides Namespace support for Element and Attr names 

NSResolver 

This interface provides support for resolving Namespaces 

XMLDocumentHandler 

This interface extends the org.xml.sax.DocumentHandler interface. 

XMLToken 

Basic interface for XMLToken  

Classes 

 

AttrDecl 

This class hold information about each attribute declared in an attribute list in the Document Type Definition. 

Package oracle.xml.parser.v2 

This class implements the default behaviour for the XMLDocumentHandler interface. 

DOMParser 

This class implements an eXtensible Markup Language (XML) 1.0 parser according to the World Wide Web Consortium (W3C) recommendation. 

DTD 

Implements the DOM DocumentType interface and holds the Document Type Definition information for an XML document. 

ElementDecl 

This class represents an element declaration in a DTD. 

NodeFactory 

This class specifies methods to create various nodes of the DOM tree built during parsing. 

oraxsl 

The oraxsl class provides a command-line interface to applying stylesheets on multiple XML documents. 

SAXAttrlist 

This class implements the SAX AttributeList interface and also provides Namespace support. 

SAXParser 

This class implements an eXtensible Markup Language (XML) 1.0 SAX parser according to the World Wide Web Consortium (W3C) recommendation. 

XMLAttr 

This class implements the DOM Attr interface and holds information on each attribute of an element. 

XMLCData 

This class implements the DOM CDATASection interface. 

XMLComment 

This class implements the DOM Comment interface. 

XMLDocument 

This class implements the DOM Document interface, represents an entire XML document and serves the root of the Document Object Model tree. 

XMLDocumentFragment 

This class implements the DOM DocumentFragment interface. 

XMLElement 

This class implements the DOM Element interface. 

XMLEntityReference 

 

XMLNode 

Implements the DOM Node interface and serves as the primary datatype for the entire Document Object Model. 

XMLParser 

This class serves as a base class for the DOMParser and SAXParser classes. 

XMLPI 

This class implements the DOM Processing Instruction interface. 

XMLText 

This class implements the DOM Text interface. 

XMLTokenizer 

This class implements an eXtensible Markup Language (XML) 1.0 parser according to the World Wide Web Consortium (W3C) recommendation. 

XSLProcessor 

This class provides methods to transform an input XML document using a previously constructed XSLStylesheet

XSLStylesheet 

The class holds XSL stylesheet information such as templates, keys, variables, and attribute sets. 

Exceptions 

 

XMLParseException 

Indicates that a parsing exception occurred while processing an XML document 

XSLException 

Indicates that an exception occurred during XSL tranformation 


AttrDecl

Syntax

public class AttrDecl extends XMLNode implements 
oracle.xml.parser.v2.XMLConstants, java.io.Serializable
 
java.lang.Object
  |
  +--XMLNode
        |
        +--oracle.xml.parser.v2.AttrDecl

All Implemented Interfaces

java.lang.Cloneable, org.w3c.dom.Node, java.io.Serializable, 
oracle.xml.parser.v2.XMLConstants

Description

This class holds information about each attribute declared in an attribute list in the Document Type Definition.

Member Summary 

 

Fields 

 

CDATA 

AttType - StringType - CDATA 

DEFAULT 

Attribute presence - Default 

ENTITIES 

AttType - TokenizedType - Entities 

ENTITY 

AttType - TokenizedType - Entity 

ENUMERATION 

AttType - EnumeratedType - Enumeration 

FIXED 

Attribute presence - Fixed 

ID 

AttType - TokenizedType - ID 

IDREF 

AttType - TokenizedType - ID reference 

IDREFS 

AttType - TokenizedType - ID references 

IMPLIED 

Attribute presence - Implied 

NMTOKEN 

AttType - TokenizedType - Name token 

NMTOKENS 

AttType - TokenizedType - Name tokens 

NOTATION 

AttType - EnumeratedType - Notation 

REQUIRED 

Attribute presence - Required 

Methods 

 

getAttrPresence() 

Gets attribute presence 

getAttrType() 

Gets attribute type 

getDefaultValue() 

Gets attribute default value 

getEnumerationValues() 

Gets attribute values 

Inherited Member Summary 

Fields inherited from class XMLNode 

AMP, ASTERISK, ATTRDECL, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, ELEMENTDECL, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface Node 

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

Methods inherited from class XMLNode 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), print(OutputStream), print(OutputStream, String), print(PrintWriter), removeChild(Node), replaceChild(Node, Node), selectNodes(String, NSResolver), selectSingleNode(String, NSResolver), setNodeValue(String), transformNode(XSLStylesheet), valueOf(String, NSResolver) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface Node 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), removeChild(Node), replaceChild(Node, Node), setNodeValue(String) 

Fields

CDATA

public static final int CDATA

AttType - StringType - CDATA

DEFAULT

public static final int DEFAULT

Attribute presence - Default

ENTITIES

public static final int ENTITIES

AttType - TokenizedType - Entities

ENTITY

public static final int ENTITY

AttType - TokenizedType - Entity

ENUMERATION

public static final int ENUMERATION

AttType - EnumeratedType - Enumeration

FIXED

public static final int FIXED

Attribute presence - Fixed

ID

public static final int ID

AttType - TokenizedType - ID

IDREF

public static final int IDREF

AttType - TokenizedType - ID reference

IDREFS

public static final int IDREFS

AttType - TokenizedType - ID references

IMPLIED

public static final int IMPLIED

Attribute presence - Implied

NMTOKEN

public static final int NMTOKEN

AttType - TokenizedType - Name token

NMTOKENS

public static final int NMTOKENS

AttType - TokenizedType - Name tokens

NOTATION

public static final int NOTATION

AttType - EnumeratedType - Notation

REQUIRED

public static final int REQUIRED

Attribute presence - Required

Methods

getAttrPresence()

public int getAttrPresence()

Gets attribute presence

Returns

The presence of the attribute

getAttrType()

public int getAttrType()

Gets attribute type

Returns

The type of the attribute

getDefaultValue()

public java.lang.String getDefaultValue()

Gets attribute default value

Returns

The default value of the attribute

getEnumerationValues()

public java.util.Vector getEnumerationValues()

Gets attribute values

Returns

The values of the attribute as an Enumeration


DefaultXMLDocumentHandler

Syntax

public class DefaultXMLDocumentHandler extends org.xml.sax.HandlerBase implements 
XMLDocumentHandler
 
java.lang.Object
  |
  +--org.xml.sax.HandlerBase
        |
        +--oracle.xml.parser.v2.DefaultXMLDocumentHandler

Direct Known Subclasses:

XMLTokenizer

All Implemented Interfaces

org.xml.sax.DocumentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, 
org.xml.sax.ErrorHandler, XMLDocumentHandler

Description

This class implements the default behaviour for the XMLDocumentHandler interface.

Application writers can extend this class when they need to implement only part of the interface

Member Summary 

 

Constructors 

 

DefaultXMLDocumentHandler() 

Constructs a default document handler 

Methods 

 

cDATASection(char[], int, int) 

Receive notification of a CDATA Section. 

comment(String) 

Receive notification of a comment. 

endDoctype() 

Receive notification of end of the DTD. 

endElement(NSName) 

Receive notification of the end of an element. 

setDoctype(DTD) 

Receive notification of DTD. 

setTextDecl(String, String) 

Receive notification of a Text XML Declaration. 

setXMLDecl(String, String, String) 

Receive notification of an XML Declaration. 

startElement(NSName, SAXAttrList) 

Receive notification of the beginning of an element. 

Inherited Member Summary 

Methods inherited from class HandlerBase 

characters(char[], int, int), endDocument(), endElement(String), error(SAXParseException), fatalError(SAXParseException), ignorableWhitespace(char[], int, int), notationDecl(String, String, String), processingInstruction(String, String), resolveEntity(String, String), setDocumentLocator(Locator), startDocument(), startElement(String, AttributeList), unparsedEntityDecl(String, String, String, String), warning(SAXParseException) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface DocumentHandler 

characters(char[], int, int), endDocument(), endElement(String), ignorableWhitespace(char[], int, int), processingInstruction(String, String), setDocumentLocator(Locator), startDocument(), startElement(String, AttributeList) 

Methods inherited from interface EntityResolver 

resolveEntity(String, String) 

Methods inherited from interface DTDHandler 

notationDecl(String, String, String), unparsedEntityDecl(String, String, String, String) 

Methods inherited from interface ErrorHandler 

error(SAXParseException), fatalError(SAXParseException), warning(SAXParseException) 

Constructor

DefaultXMLDocumentHandler()

public  DefaultXMLDocumentHandler()

Constructs a default document handler

Methods

cDATASection(char[], int, int)

public void cDATASection(char[] ch, int start, int length)

Receive notification of a CDATA Section.

The Parser will invoke this method once for each CDATA Section found.

Specified By

cDATASection(char[ ], int, int) in interface XMLDocumentHandler

Parameters

ch - The CDATA section characters.

start - The start position in the character array.

length - The number of characters to use from the character array.

Throws

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

comment(String)

public void comment(java.lang.String data)

Receive notification of a comment.

The Parser will invoke this method once for each comment found: note that comment may occur before or after the main document element.

Specified By

comment(String) in interface XMLDocumentHandler

Parameters

data - The comment data, or null if none was supplied.

Throws

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

endDoctype()

public void endDoctype()

Receive notification of end of the DTD.

Specified By

endDoctype() in interface XMLDocumentHandler

Throws

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

endElement(NSName)

public void endElement(NSName elem)

Receive notification of the end of an element. The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding startElement() event for every endElement() event (even when the element is empty).

By implementing this method instead of org.xml.sax.DocumentHandler.endElement, SAX Applications can get the Namespace support provided by NSName.

Specified By

endElement(NSName) in interface XMLDocumentHandler

Parameters

elem - NSName object

Throws

org.xml.sax.SAXException - A SAXException could be thrown.

See Also

org.xml.sax.DocumentHandler.endElement(String)

setDoctype(DTD)

public void setDoctype(DTD dtd)

Receive notification of DTD. Sets the DTD

Specified By

setDoctype(DTD) in interface XMLDocumentHandler

Throws

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

setTextDecl(String, String)

public void setTextDecl(java.lang.String version, java.lang.String encoding)

Receive notification of a Text XML Declaration.

The Parser will invoke this method once for each text XML Decl

Specified By

setTextDecl(String, String) in interface XMLDocumentHandler

Parameters

version - The version number (or null, if not specified)

encoding - The encoding name

Throws

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

setXMLDecl(String, String, String)

public void setXMLDecl(java.lang.String version, java.lang.String standalone, 
java.lang.String encoding)

Receive notification of an XML Declaration.

The Parser will invoke this method once for XML Decl

Specified By

setXMLDecl(String, String, String) in interface XMLDocumentHandler

Parameters

version - The version number

standalone - The standalone value (or null, if not specifed)

encoding - The encoding name (or null, if not specifed)

Throws

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

startElement(NSName, SAXAttrList)

public void startElement(NSName elem, SAXAttrList attrlist)

Receive notification of the beginning of an element. The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding endElement() event for every startElement() event (even when the element is empty). All of the element's content will be reported, inorder, before the corresponding endElement() event.

By implementing this method instead of org.xml.sax.DocumentHandler.startElement, SAX Applications can get the Namespace support provided by NSName and SAXAttrList.

Specified By

startElement(NSName, SAXAttrList) in interface XMLDocumentHandler

Parameters

elem - NSName object

attrlist - SAXAttrList for the element

Throws

org.xml.sax.SAXException - A SAXException could be thrown.

See Also

org.xml.sax.DocumentHandler.startElement(String, AttributeList)


DOMParser

Syntax

public class DOMParser extends XMLParser implements 
oracle.xml.parser.v2.XMLConstants
 
java.lang.Object
  |
  +--XMLParser
        |
        +--oracle.xml.parser.v2.DOMParser

All Implemented Interfaces

oracle.xml.parser.v2.XMLConstants

Description

This class implements an eXtensible Markup Language (XML) 1.0 parser according to the World Wide Web Consortium (W3C) recommendation to parse a XML document and build a DOM tree.

Member Summary 

 

Constructors 

 

DOMParser() 

Creates a new parser object. 

Methods 

 

getDoctype() 

Get the DTD 

getDocument() 

Gets the document 

parseDTD(InputSource, String) 

Parses the XML External DTD from given input source 

parseDTD(InputStream, String) 

Parses the XML External DTD from given input stream. 

parseDTD(Reader, String) 

Parses the XML External DTD from given input stream. 

parseDTD(String, String) 

Parses the XML External DTD from the URL indicated 

parseDTD(URL, String) 

Parses the XML External DTD document pointed to by the given URL and creates the corresponding XML document hierarchy. 

setErrorStream(OutputStream) 

Creates an output stream for the output of errors and warnings. 

setErrorStream(OutputStream, String) 

Creates an output stream for the output of errors and warnings. 

setErrorStream(PrintWriter) 

Creates an output stream for the output of errors and warnings. 

setNodeFactory(NodeFactory) 

Set the node factory. 

showWarnings(boolean) 

Switch to determine whether to print warnings 

Inherited Member Summary 

Fields inherited from class XMLParser 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class XMLParser 

getReleaseVersion(), getValidationMode(), parse(InputSource), parse(InputStream), parse(Reader), parse(String), parse(URL), setBaseURL(URL), setDoctype(DTD), setLocale(Locale), setPreserveWhitespace(boolean), setValidationMode(boolean) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Constructor

DOMParser()

public  DOMParser()

Creates a new parser object.

Methods

getDoctype()

public DTD getDoctype()

Get the DTD

Returns

The DTD

getDocument()

public XMLDocument getDocument()

Gets the document

Returns

The document being parsed

parseDTD(InputSource, String)

public final void parseDTD(org.xml.sax.InputSource in, java.lang.String rootName)

Parses the XML External DTD from given input source

Parameters

in - the org.xml.sax.InputSouce to parse

rootName - the element to be used as root Element

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

parseDTD(InputStream, String)

public final void parseDTD(java.io.InputStream in, java.lang.String rootName)

Parses the XML External DTD from given input stream. The base URL should be set for resolving external entities and DTD.

Parameters

in - the InputStream containing XML data to parse.

rootName - the element to be used as root Element

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

See Also

setBaseURL(URL)

parseDTD(Reader, String)

public final void parseDTD(java.io.Reader r, java.lang.String rootName)

Parses the XML External DTD from given input stream. The base URL should be set for resolving external entities and DTD.

Parameters

r - the Reader containing XML data to parse.

rootName - the element to be used as root Element

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

See Also

setBaseURL(URL)

parseDTD(String, String)

public final void parseDTD(java.lang.String in, java.lang.String rootName)

Parses the XML External DTD from the URL indicated

Parameters

in - the String containing the URL to parse from

rootName - the element to be used as root Element

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

parseDTD(URL, String)

public final void parseDTD(java.net.URL url, java.lang.String rootName)

Parses the XML External DTD document pointed to by the given URL and creates the corresponding XML document hierarchy.

Parameters

url - the url points to the XML document to parse.

rootName - the element to be used as root Element

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

setErrorStream(OutputStream)

public final void setErrorStream(java.io.OutputStream out)

Creates an output stream for the output of errors and warnings. If an output stream for errors is not specified, the parser will use the standard error output stream System.err for outputting errors and warnings.

Parameters

out - The output stream to use for errors and warnings

setErrorStream(OutputStream, String)

public final void setErrorStream(java.io.OutputStream out, java.lang.String enc)

Creates an output stream for the output of errors and warnings. If an output stream for errors is not specified, the parser will use the standard error output stream System.err for outputting errors and warnings. Additionally, an .exception is thrown if the encoding specified is unsupported.

Parameters

out - The output stream to use for errors and warnings

enc - the encoding to use

Throws

IOException - if an unsupported encoding is specified

setErrorStream(PrintWriter)

public final void setErrorStream(java.io.PrintWriter out)

Creates an output stream for the output of errors and warnings. If an output stream for errors is not specified, the parser will use the standard error output stream System.err for outputting errors and warnings.

Parameters

out - The PrintWriter to use for errors and warnings

setNodeFactory(NodeFactory)

public void setNodeFactory(NodeFactory factory)

Set the node factory. Applications can extend the NodeFactory and register it through this method. The parser will then use the user supplied NodeFactory to create nodes of the DOM tree.

Parameters

factory - The NodeFactory to set

Throws

XMLParseException - if an invalid factory is set

See Also

NodeFactory

showWarnings(boolean)

public void showWarnings(boolean yes)

Switch to determine whether to print warnings

Parameters

yes - determines whether warnings should be shown


DTD

Syntax

public class DTD extends XMLNode implements org.w3c.dom.DocumentType, 
java.io.Serializable
 
java.lang.Object
  |
  +--XMLNode
        |
        +--oracle.xml.parser.v2.DTD

All Implemented Interfaces

java.lang.Cloneable, org.w3c.dom.DocumentType, org.w3c.dom.Node, 
java.io.Serializable, oracle.xml.parser.v2.XMLConstants

Description

Implements the DOM DocumentType interface and holds the Document Type Definition information for an XML document.

Member Summary 

 

Methods 

 

cloneNode(boolean) 

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

findElementDecl(String) 

Finds an element declaration for the given tag name. 

findEntity(String, boolean) 

Finds a named entity in the DTD. 

findNotation(String) 

Retrieves the named notation from the DTD. 

getChildNodes() 

A NodeList that contains all children of this node. 

getElementDecls() 

A NamedNodeMap containing the element declarations in the DTD. 

getEntities() 

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

getName() 

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

getNotations() 

A NamedNodeMap containing the notations declared in the DTD. 

getPublicId() 

Gets The public identifier associated with the DTD, if specified. 

getSystemId() 

Gets the system identifier associated with the DTD, if specified. 

hasChildNodes() 

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

printExternalDTD(OutputStream) 

Writes the contents of this document to the given output stream. 

printExternalDTD(OutputStream, String) 

Writes the contents of the external DTD to the given output stream. 

printExternalDTD(PrintWriter) 

Writes the contents of this document to the given output stream. 

Inherited Member Summary 

Fields inherited from class XMLNode 

AMP, ASTERISK, ATTRDECL, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, ELEMENTDECL, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface Node 

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

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class XMLNode 

appendChild(Node), getAttributes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), insertBefore(Node, Node), print(OutputStream), print(OutputStream, String), print(PrintWriter), removeChild(Node), replaceChild(Node, Node), selectNodes(String, NSResolver), selectSingleNode(String, NSResolver), setNodeValue(String), transformNode(XSLStylesheet), valueOf(String, NSResolver) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface Node 

appendChild(Node), getAttributes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), insertBefore(Node, Node), removeChild(Node), replaceChild(Node, Node), setNodeValue(String) 

Methods

cloneNode(boolean)

public org.w3c.dom.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.

Specified By

org.w3c.dom.Node.cloneNode(boolean) in interface org.w3c.dom.Node

Overrides

cloneNode(boolean) in class XMLNode

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.

findElementDecl(String)

public final ElementDecl findElementDecl(java.lang.String name)

Finds an element declaration for the given tag name.

Parameters

name - The tag name.

Returns

the element declaration object.

findEntity(String, boolean)

public final org.w3c.dom.Entity findEntity(java.lang.String n, boolean par)

Finds a named entity in the DTD.

Parameters

n - The name of the entity.

Returns

the specified Entity object; returns null if it is not found.

findNotation(String)

public final org.w3c.dom.Notation findNotation(java.lang.String name)

Retrieves the named notation from the DTD.

Parameters

name - The name of the notation.

Returns

the Notation object; returns null if it is not found.

getChildNodes()

public org.w3c.dom.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.

Specified By

org.w3c.dom.Node.getChildNodes() in interface org.w3c.dom.Node

Overrides

getChildNodes() in class XMLNode

Returns

The children of this node

getElementDecls()

public org.w3c.dom.NamedNodeMap getElementDecls()

A NamedNodeMap containing the element declarations in the DTD. Every node in this map is an ElementDecl object.

Returns

The element declarations in the DTD The DOM Level 1 does not support editing elementdecls, therefore elementdecls cannot be altered in any way.

getEntities()

public org.w3c.dom.NamedNodeMap 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.

Specified By

org.w3c.dom.DocumentType.getEntities() in interface org.w3c.dom.DocumentType

Returns

The entities declared in the DTD

getName()

public java.lang.String getName()

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

Specified By

org.w3c.dom.DocumentType.getName() in interface org.w3c.dom.DocumentType

Returns

Name of the DTD

getNotations()

public org.w3c.dom.NamedNodeMap 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.

Specified By

org.w3c.dom.DocumentType.getNotations() in interface org.w3c.dom.DocumentType

Returns

The notations declared in the DTD

getPublicId()

public java.lang.String getPublicId()

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

Returns

the public identifier associated with the DTD

getSystemId()

public java.lang.String getSystemId()

Gets the system identifier associated with the DTD, if specified. If the system identifier was not specified, this is null.

Returns

the system identifier associated with the DTD

hasChildNodes()

public boolean hasChildNodes()

This is a convenience method to allow easy determination of whether a node has any children. return false always, as DTD cannot have any overrides method in XMLNode

Specified By

org.w3c.dom.Node.hasChildNodes() in interface org.w3c.dom.Node

Overrides

hasChildNodes() in class XMLNode

Returns

false as DTD node can not have any children,

printExternalDTD(OutputStream)

public void printExternalDTD(java.io.OutputStream out)

Writes the contents of this document to the given output stream.

Parameters

out - OutputStream to write to

Throws

IOException - if an error occurs

printExternalDTD(OutputStream, String)

public void printExternalDTD(java.io.OutputStream out, java.lang.String enc)

Writes the contents of the external DTD to the given output stream.

Parameters

out - OutputStream to write to

enc - Encoding to use for the output

Throws

IOException - if an invalid encoding was specified or if any other error occurs

printExternalDTD(PrintWriter)

public void printExternalDTD(java.io.PrintWriter out)

Writes the contents of this document to the given output stream.

Parameters

out - PrintWriter to write to

Throws

IOException - if an error occurs


ElementDecl

Syntax

public class ElementDecl extends XMLNode implements java.io.Serializable
 
java.lang.Object
  |
  +--XMLNode
        |
        +--oracle.xml.parser.v2.ElementDecl

All Implemented Interfaces

java.lang.Cloneable, org.w3c.dom.Node, java.io.Serializable, 
oracle.xml.parser.v2.XMLConstants

Description

This class represents an element declaration in a DTD.

Member Summary 

 

Fields 

 

ANY 

Element content type - Children can be any element 

ASTERISK 

ContentModelParseTreeNode type - "*" node (has one children) 

COMMA 

ContentModelParseTreeNode type - "," node (has two children) 

ELEMENT 

ContentModelParseTreeNode type - 'leaf' node (has no children) 

ELEMENTS 

Element content type - Children can be elements as per Content Model 

EMPTY 

Element content type - No Children 

MIXED 

Element content type - Children can be PCDATA & elements as per Content Model 

OR 

ContentModelParseTreeNode type - "|" node (has two children) 

PLUS 

ContentModelParseTreeNode type - "+" node (has one children) 

QMARK 

ContentModelParseTreeNode type - "?" node (has one children) 

Methods 

 

expectedElements(Element) 

Returns vector of element names that can be appended to the element. 

findAttrDecl(String) 

Gets an attribute declaration object or null if not found 

getAttrDecls() 

Gets an enumeration of attribute declarations 

getContentElements() 

Returns Vector of elements that can be appended to this element 

getContentType() 

Returns content model of element 

getParseTree() 

Returns the root node of Content Model Parse Tree. 

validateContent(Element) 

Validates the content of a element node. 

Inherited Member Summary 

Fields inherited from class XMLNode 

AMP, ATTRDECL, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, ELEMENTDECL, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, PERCENT, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface Node 

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

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, PERCENT, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class XMLNode 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), print(OutputStream), print(OutputStream, String), print(PrintWriter), removeChild(Node), replaceChild(Node, Node), selectNodes(String, NSResolver), selectSingleNode(String, NSResolver), setNodeValue(String), transformNode(XSLStylesheet), valueOf(String, NSResolver) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface Node 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), removeChild(Node), replaceChild(Node, Node), setNodeValue(String) 

Fields

ANY

public static final byte ANY

Element content type - Children can be any element

ASTERISK

public static final int ASTERISK

ContentModelParseTreeNode type - "*" node (has one children)

COMMA

public static final int COMMA

ContentModelParseTreeNode type - "," node (has two children)

ELEMENT

public static final int ELEMENT

ContentModelParseTreeNode type - 'leaf' node (has no children)

ELEMENTS

public static final byte ELEMENTS

Element content type - Children can be elements as per Content Model

EMPTY

public static final byte EMPTY

Element content type - No Children

MIXED

public static final byte MIXED

Element content type - Children can be PCDATA & elements as per Content Model

OR

public static final int OR

ContentModelParseTreeNode type - "|" node (has two children)

PLUS

public static final int PLUS

ContentModelParseTreeNode type - "+" node (has one children)

QMARK

public static final int QMARK

ContentModelParseTreeNode type - "?" node (has one children)

Methods

expectedElements(Element)

public java.util.Vector expectedElements(org.w3c.dom.Element e)

Returns vector of element names that can be appended to the element.

Parameters

e - Element

Returns

Vector of names

findAttrDecl(String)

public final AttrDecl findAttrDecl(java.lang.String name)

Gets an attribute declaration object or null if not found

Parameters

name - Attribute declaration to find

Returns

The AttrDecl object, or null, if it was not found

getAttrDecls()

public org.w3c.dom.NamedNodeMap getAttrDecls()

Gets an enumeration of attribute declarations

Returns

An enumeration of attribute declarations

getContentElements()

public final java.util.Vector getContentElements()

Returns Vector of elements that can be appended to this element

Returns

The Vector containing the element names.

getContentType()

public int getContentType()

Returns content model of element

Returns

The type of the element declaration.

getParseTree()

public final org.w3c.dom.Node getParseTree()

Returns the root node of Content Model Parse Tree. Node.getFirstChild() and Node.getLastChild() return the the parse tree branches. Node.getNodeType() and Node.getNodeName() return the the parse tree node type and name.

Returns

The Node containing the Content Model parse tree root node.

validateContent(Element)

public boolean validateContent(org.w3c.dom.Element e)

Validates the content of a element node.

Returns

True if valid, else false


NodeFactory

Syntax

public class NodeFactory extends java.lang.Object implements 
java.io.Serializable
 
java.lang.Object
  |
  +--oracle.xml.parser.v2.NodeFactory

All Implemented Interfaces

java.io.Serializable

Description

This class specifies methods to create various nodes of the DOM tree built during parsing. Applications can override these methods to create their own custom classes to be added to the DOM tree while parsing. Applications have to register their own NodeFactory using the XMLParser's setNodeFactory() method. If a null pointer is returned by these methods, then the node will not be added to the DOM tree.

See Also

setNodeFactory(NodeFactory)

Member Summary 

 

Constructors 

 

NodeFactory() 

 

Methods 

 

createAttribute(String, String) 

Creates an attribute node with the specified tag, and text. 

createCDATASection(String) 

Creates a CDATA node with the specified text. 

createComment(String) 

Creates a comment node with the specified text. 

createDocument() 

Creates a document node. 

createElement(String) 

Creates an Element node with the specified tag. 

createProcessingInstruction(String, String) 

Creates a PI node with the specified tag, and text. 

createTextNode(String) 

Creates a text node with the specified text. 

Inherited Member Summary 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Constructor

NodeFactory()

public  NodeFactory()

Methods

createAttribute(String, String)

public XMLAttr createAttribute(java.lang.String tag, java.lang.String text)

Creates an attribute node with the specified tag, and text.

Parameters

tag - The name of the node.

text - The text associated with the node.

Returns

The created attribute node.

createCDATASection(String)

public XMLCDATA createCDATASection(java.lang.String text)

Creates a CDATA node with the specified text.

Parameters

text - The text associated with the node.

Returns

The created CDATA node.

createComment(String)

public XMLComment createComment(java.lang.String text)

Creates a comment node with the specified text.

Parameters

text - The text associated with the node.

Returns

The created comment node.

createDocument()

public XMLDocument createDocument()

Creates a document node. This method cannot return a null pointer.

Returns

The created element.

createElement(String)

public XMLElement createElement(java.lang.String tag)

Creates an Element node with the specified tag.

Parameters

tag - The name of the element.

Returns

The created element.

createProcessingInstruction(String, String)

public XMLPI createProcessingInstruction(java.lang.String tag, java.lang.String 
text)

Creates a PI node with the specified tag, and text.

Parameters

tag - The name of the node.

text - The text associated with the node.

Returns

The created PI node.

createTextNode(String)

public XMLText createTextNode(java.lang.String text)

Creates a text node with the specified text.

Parameters

text - The text associated with the node.

Returns

The created text node.


NSName

Syntax

public interface NSName

All Known Implementing Classes:

XMLAttr, XMLElement

Description

This interface provides Namespace support for Element and Attr names

Member Summary 

 

Methods 

 

getExpandedName() 

Get the fully resolved name for this name 

getLocalName() 

Get the local name for this name 

getNamespace() 

Get the resolved Namespace for this name 

getPrefix() 

Get the prefix for this name 

getQualifiedName() 

Get the qualified name 

Methods

getExpandedName()

public java.lang.String getExpandedName()

Get the fully resolved name for this name

Returns

The fully resolved name

getLocalName()

public java.lang.String getLocalName()

Get the local name for this name

Returns

The local name

getNamespace()

public java.lang.String getNamespace()

Get the resolved Namespace for this name

Returns

The resolved Namespace

getPrefix()

public java.lang.String getPrefix()

Get the prefix for this name

Returns

The prefix

getQualifiedName()

public java.lang.String getQualifiedName()

Get the qualified name

Returns

The qualified name


NSResolver

Syntax

public interface NSResolver

All Known Implementing Classes

XMLElement

Description

This interface provides support for resolving Namespaces

Member Summary 

 

Methods 

 

resolveNamespacePrefix(String) 

Find the namespace definition in scope for a given namespace prefix 

Methods

resolveNamespacePrefix(String)

public java.lang.String resolveNamespacePrefix(java.lang.String prefix)

Find the namespace definition in scope for a given namespace prefix

Parameters

prefix - Namespace prefix to be resolved

Returns

the resolved Namespace (null, if prefix could not be resolved)


oraxsl

Syntax

public class oraxsl extends java.lang.Object
 
java.lang.Object
  |
  +--oracle.xml.parser.v2.oraxsl

Description

The oraxsl class provides a command-line interface to applying stylesheets on multiple XML documents. It accepts a number of command-line options that dictate how it should behave. The following is its invocation syntax:

java oraxsl options*source?stylesheet?result? 
   -w (Show warnings) 
   -e<error log>        (A file to write errors to) 
   -l<xml file list>    (List of files to transform) 
   -d<directory>        (Directory with files to transform) 
   -x<source extension> (Extensions to exclude) 
   -i<source extension> (Extensions to include) 
   -s<stylesheet>       (Stylesheet to use) 
   -r<result extension> (Extension to use for results) 
   -o<result extension> (Directory to place results) 
   -p<param list>       (List of Params)
   -t<# of threads>     (Number of threads to us) 
   -v                           (Verbose mode) 

Member Summary 

 

Constructors 

 

oraxsl() 

 

Methods 

 

main(String[]) 

Invokes the oraxsl driver 

Inherited Member Summary 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Constructor

oraxsl()

public  oraxsl()

Methods

main(String[])

public static void main(java.lang.String[] args)

Invokes the oraxsl driver

Parameters

args - command line arguments


SAXAttrList

Syntax

public class SAXAttrList extends java.lang.Object implements 
org.xml.sax.AttributeList
 
java.lang.Object
  |
  +--oracle.xml.parser.v2.SAXAttrList

All Implemented Interfaces

org.xml.sax.AttributeList

Description

This class implements the SAX AttributeList interface and also provides Namespace support. Applications that require Namespace support can explicitly cast any attribute list returned by an Oracle parser class to SAXAttrList and use the methods described here.

Member Summary 

 

Methods 

 

getExpandedName(int) 

Get the expanded name for an attribute in the list (by position) 

getLength() 

Return the number of attributes in this list. 

getLocalName(int) 

Get the local name for an attribute in the list (by position) 

getName(int) 

Return the name of an attribute in this list (by position). 

getNamespace(int) 

Get the resolved namespace for an attribute in the list (by position) 

getPrefix(int) 

Get the namespace prefix for an attribute in the list (by position) 

getQualifiedName(int) 

Get the qualified name for an attribute in the list (by position) 

getType(int) 

 

getType(String) 

Return the type of an attribute in the list (by name). 

getValue(int) 

Return the value of an attribute in the list (by position). 

getValue(String) 

Return the value of an attribute in the list (by name). 

Inherited Member Summary 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods

getExpandedName(int)

public java.lang.String getExpandedName(int i)

Get the expanded name for an attribute in the list (by position)

Parameters

i - The index of the attribute in the list.

Returns

The expanded name for the attribute

getLength()

public int getLength()

Return the number of attributes in this list.

The SAX parser may provide attributes in any arbitrary order, regardless of the order in which they were declared or specified. The number of attributes may be zero.

Specified By

org.xml.sax.AttributeList.getLength() in interface org.xml.sax.AttributeList

Returns

The number of attributes in the list.

getLocalName(int)

public java.lang.String getLocalName(int i)

Get the local name for an attribute in the list (by position)

Parameters

i - The index of the attribute in the list.

Returns

The local name for the attribute

getName(int)

public java.lang.String getName(int i)

Return the name of an attribute in this list (by position).

The names must be unique the SAX parser shall not include the same attribute twice. Attributes without values (those declared #IMPLIED without a value specified in the start tag) will be omitted from the list.

If the attribute name has a namespace prefix, the prefix will still be attached.

Specified By

org.xml.sax.AttributeList.getName(int) in interface org.xml.sax.AttributeList

Parameters

i - The index of the attribute in the list (starting at 0).

Returns

The name of the indexed attribute, or null if the index is out of range.

See Also

getLength()

getNamespace(int)

public java.lang.String getNamespace(int i)

Get the resolved namespace for an attribute in the list (by position)

Parameters

i - The index of the attribute in the list.

Returns

The resolved namespace for the attribute

getPrefix(int)

public java.lang.String getPrefix(int i)

Get the namespace prefix for an attribute in the list (by position)

Parameters

i - The index of the attribute in the list.

Returns

The namespace prefix for the attribute

getQualifiedName(int)

public java.lang.String getQualifiedName(int i)

Get the qualified name for an attribute in the list (by position)

Parameters

i - The index of the attribute in the list.

Returns

The qualified name for the attribute

getType(int)

public java.lang.String getType(int i)

Specified By

org.xml.sax.AttributeList.getType(int) in interface org.xml.sax.AttributeList

getType(String)

public java.lang.String getType(java.lang.String s)

Return the type of an attribute in the list (by name).

The return value is the same as the return value for getType(int).

If the attribute name has a namespace prefix in the document, the application must include the prefix here.

Specified By

org.xml.sax.AttributeList.getType(String) in interface org.xml.sax.AttributeList

Parameters

name - The name of the attribute.

Returns

The attribute type as a string, or null if no such attribute exists.

See Also

getType(int)

getValue(int)

public java.lang.String getValue(int i)

Return the value of an attribute in the list (by position).

If the attribute value is a list of tokens (IDREFS, ENTITIES, or NMTOKENS), the tokens will be concatenated into a single string separated by whitespace.

Specified By

org.xml.sax.AttributeList.getValue(int) in interface org.xml.sax.AttributeList

Parameters

i - The index of the attribute in the list (starting at 0).

Returns

The attribute value as a string, or null if the index is out of range.

See Also

getLength(), getValue(String)

getValue(String)

public java.lang.String getValue(java.lang.String s)

Return the value of an attribute in the list (by name).

The return value is the same as the return value for getValue(int).

If the attribute name has a namespace prefix in the document, the application must include the prefix here.

Specified By

org.xml.sax.AttributeList.getValue(String) in interface org.xml.sax.AttributeList

Parameters

i - The index of the attribute in the list.

Returns

The attribute value as a string, or null if no such attribute exists.

See Also

getValue(int)


SAXParser

Syntax

public class SAXParser extends XMLParser implements org.xml.sax.Parser, 
oracle.xml.parser.v2.XMLConstants
 
java.lang.Object
  |
  +--XMLParser
        |
        +--oracle.xml.parser.v2.SAXParser

All Implemented Interfaces

org.xml.sax.Parser, oracle.xml.parser.v2.XMLConstants

Description

This class implements an eXtensible Markup Language (XML) 1.0 SAX parser according to the World Wide Web Consortium (W3C) recommendation. Applications can register a SAX handler to receive notification of various parser events.

Member Summary 

 

Constructors 

 

SAXParser() 

Creates a new parser object. 

Methods 

 

setDocumentHandler(DocumentHandler) 

SAX applications can use this to register a new document event handler. 

setDTDHandler(DTDHandler) 

SAX applications can use this to register a new DTD event handler. 

setEntityResolver(EntityResolver) 

SAX applications can use this to register a new entity resolver 

setErrorHandler(ErrorHandler) 

SAX applications can use this to register a new error event handler. 

Inherited Member Summary 

Fields inherited from class XMLParser 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class XMLParser 

getReleaseVersion(), getValidationMode(), parse(InputSource), parse(InputStream), parse(Reader), parse(String), parse(URL), setBaseURL(URL), setDoctype(DTD), setLocale(Locale), setPreserveWhitespace(boolean), setValidationMode(boolean) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface Parser 

parse(InputSource), parse(String), setLocale(Locale) 

Constructor

SAXParser()

public  SAXParser()

Creates a new parser object.

Methods

setDocumentHandler(DocumentHandler)

public void setDocumentHandler(org.xml.sax.DocumentHandler handler)

SAX applications can use this to register a new document event handler.

Specified By

org.xml.sax.Parser.setDocumentHandler(DocumentHandler) in interface org.xml.sax.Parser

Parameters

handler - DocumentHandler being registered

See Also

org.xml.sax.Parser.setDocumentHandler(DocumentHandler), org.xml.sax.DocumentHandler

setDTDHandler(DTDHandler)

public void setDTDHandler(org.xml.sax.DTDHandler handler)

SAX applications can use this to register a new DTD event handler.

Specified By

org.xml.sax.Parser.setDTDHandler(DTDHandler) in interface org.xml.sax.Parser

Parameters

handler - DTDHandler being registered

See Also

org.xml.sax.Parser.setDTDHandler(DTDHandler), org.xml.sax.DTDHandler

setEntityResolver(EntityResolver)

public void setEntityResolver(org.xml.sax.EntityResolver resolver)

SAX applications can use this to register a new entity resolver

Specified By

org.xml.sax.Parser.setEntityResolver(EntityResolver) in interface org.xml.sax.Parser

Parameters

resolver - EntityResolver being registered

See Also

org.xml.sax.Parser.setEntityResolver(EntityResolver), org.xml.sax.DTDHandler

setErrorHandler(ErrorHandler)

public void setErrorHandler(org.xml.sax.ErrorHandler handler)

SAX applications can use this to register a new error event handler. This replaces any previous setting for error handling.

Specified By

org.xml.sax.Parser.setErrorHandler(ErrorHandler) in interface org.xml.sax.Parser

Parameters

handler - ErrorHandler being registered

See Also

org.xml.sax.Parser.setErrorHandler(ErrorHandler), org.xml.sax.ErrorHandler


XMLAttr

Syntax

public class XMLAttr extends XMLNode implements org.w3c.dom.Attr, NSName, 
java.io.Serializable
 
java.lang.Object
  |
  +--XMLNode
        |
        +--oracle.xml.parser.v2.XMLAttr

All Implemented Interfaces

org.w3c.dom.Attr, java.lang.Cloneable, org.w3c.dom.Node, NSName, 
java.io.Serializable, oracle.xml.parser.v2.XMLConstants

Description

This class implements the DOM Attr interface and holds information on each attribute of an element.

See Also

org.w3c.dom.Attr, NodeFactory, setNodeFactory(NodeFactory)

Member Summary 

 

Constructors 

 

XMLAttr(String, String) 

Construct attribute with given name and value. 

XMLAttr(String, String, String, String) 

Namespace support 

Methods 

 

cloneNode(boolean) 

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

getExpandedName() 

Get the fully resolved Name for this attribute 

getLocalName() 

Get the local Name for this attribute 

getName() 

Gets the attribute name. 

getNamespace() 

Get the resolved Namespace for this attribute 

getNodeValue() 

Gets the value of this node, depending on its type 

getParentNode() 

Gets the parent of this node. 

getPrefix() 

Get the namespace prefix for this attribute 

getQualifiedName() 

Gets the qualified name for this attribute 

getSpecified() 

Returns true if the attribute was specified explicity in the element 

getValue() 

Gets the attribute value. 

setNodeValue(String) 

Sets the value of this node, depending on its type 

setValue(String) 

Sets the value. 


Inherited Member Summary 

Fields inherited from class XMLNode 

AMP, ASTERISK, ATTRDECL, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, ELEMENTDECL, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface Node 

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

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class XMLNode 

appendChild(Node), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getOwnerDocument(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), print(OutputStream), print(OutputStream, String), print(PrintWriter), removeChild(Node), replaceChild(Node, Node), selectNodes(String, NSResolver), selectSingleNode(String, NSResolver), transformNode(XSLStylesheet), valueOf(String, NSResolver) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface Node 

appendChild(Node), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getOwnerDocument(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), removeChild(Node), replaceChild(Node, Node) 

Constructor

XMLAttr(String, String)

public  XMLAttr(java.lang.String n, java.lang.String v)

Construct attribute with given name and value.

Parameters

n - Name of the attribute

v - Value of the attribute

XMLAttr(String, String, String, String)

public  XMLAttr(java.lang.String name, java.lang.String prefix, java.lang.String 
ns, java.lang.String v)

Namespace support

Methods

cloneNode(boolean)

public org.w3c.dom.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.

Specified By

org.w3c.dom.Node.cloneNode(boolean) in interface org.w3c.dom.Node

Overrides

cloneNode(boolean) in class XMLNode

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.

getExpandedName()

public java.lang.String getExpandedName()

Get the fully resolved Name for this attribute

Specified By

getExpandedName() in interface NSName

Returns

the fully resolved Name

getLocalName()

public java.lang.String getLocalName()

Get the local Name for this attribute

Specified By

getLocalName() in interface NSName

Returns

the local Name

getName()

public java.lang.String getName()

Gets the attribute name.

Specified By

org.w3c.dom.Attr.getName() in interface org.w3c.dom.Attr

Returns

attribute name

getNamespace()

public java.lang.String getNamespace()

Get the resolved Namespace for this attribute

Specified By

getNamespace() in interface NSName

Returns

the resolved Namespace

getNodeValue()

public java.lang.String getNodeValue()

Gets the value of this node, depending on its type

Specified By

org.w3c.dom.Node.getNodeValue() in interface org.w3c.dom.Node

Overrides

getNodeValue() in class XMLNode

Returns

Value of this node

Throws

org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

getParentNode()

public org.w3c.dom.Node getParentNode()

Gets 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.

Specified By

org.w3c.dom.Node.getParentNode() in interface org.w3c.dom.Node

Overrides

getParentNode() in class XMLNode

Returns

The parent of this node

getPrefix()

public java.lang.String getPrefix()

Get the namespace prefix for this attribute

Specified By

getPrefix() in interface NSName

Returns

the namespace prefix

getQualifiedName()

public java.lang.String getQualifiedName()

Gets the qualified name for this attribute

Specified By

getQualifiedName() in interface NSName

Returns

the qualified name

getSpecified()

public boolean getSpecified()

Returns true if the attribute was specified explicity in the element

Specified By

org.w3c.dom.Attr.getSpecified() in interface org.w3c.dom.Attr

Returns

true, if the attribute was specified explicitly, false, if it was not

getValue()

public java.lang.String getValue()

Gets the attribute value.

Specified By

org.w3c.dom.Attr.getValue() in interface org.w3c.dom.Attr

Returns

attribute value

setNodeValue(String)

public void setNodeValue(java.lang.String nodeValue)

Sets the value of this node, depending on its type

Specified By

org.w3c.dom.Node.setNodeValue(String) in interface org.w3c.dom.Node

Overrides

setNodeValue(String) in class XMLNode

Throws

org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

setValue(String)

public void setValue(java.lang.String arg)

Sets the value.

Specified By

org.w3c.dom.Attr.setValue(String) in interface org.w3c.dom.Attr

Parameters

arg - Value to set


XMLCDATA

Syntax

public class XMLCDATA extends XMLText implements org.w3c.dom.CDATASection, 
java.io.Serializable
 
java.lang.Object
  |
  +--XMLNode
        |
        +--oracle.xml.parser.v2.CharData
              |
              +--XMLText
                    |
                    +--oracle.xml.parser.v2.XMLCDATA

All Implemented Interfaces

org.w3c.dom.CDATASection, org.w3c.dom.CharacterData, java.lang.Cloneable, 
org.w3c.dom.Node, java.io.Serializable, org.w3c.dom.Text, 
oracle.xml.parser.v2.XMLConstants

Description

This class implements the DOM CDATASection interface.

See Also

org.w3c.dom.CDATASection, NodeFactory, setNodeFactory(NodeFactory)

Member Summary 

 

Constructors 

 

XMLCDATA(String) 

Creates a CDATA node having the given name and text. 

Inherited Member Summary 

Fields inherited from class XMLNode 

AMP, ASTERISK, ATTRDECL, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, ELEMENTDECL, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface Node 

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

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class XMLText 

appendData, deleteData, getData, getLength, getNodeValue(), insertData, replaceData, setData, setNodeValue, splitText(int), substringData 

Methods inherited from class oracle.xml.parser.v2.CharData 

appendData, deleteData, getData, getLength, insertData, replaceData, setData, setNodeValue, substringData 

Methods inherited from class XMLNode 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), print(OutputStream), print(OutputStream, String), print(PrintWriter), removeChild(Node), replaceChild(Node, Node), selectNodes(String, NSResolver), selectSingleNode(String, NSResolver), transformNode(XSLStylesheet), valueOf(String, NSResolver) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface Text 

splitText(int) 

Methods inherited from interface CharacterData 

appendData(String), deleteData(int, int), getData(), getLength(), insertData(int, String), replaceData(int, int, String), setData(String), substringData(int, int) 

Methods inherited from interface Node 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), removeChild(Node), replaceChild(Node, Node), setNodeValue(String) 

Constructor

XMLCDATA(String)

public  XMLCDATA(java.lang.String text)

Creates a CDATA node having the given name and text.

Parameters

text - Text of the node


XMLComment

Syntax

public class XMLComment extends oracle.xml.parser.v2.CharData implements 
org.w3c.dom.Comment, java.io.Serializable
 
java.lang.Object
  |
  +--XMLNode
        |
        +--oracle.xml.parser.v2.CharData
              |
              +--oracle.xml.parser.v2.XMLComment

All Implemented Interfaces

org.w3c.dom.CharacterData, java.lang.Cloneable, org.w3c.dom.Comment, 
org.w3c.dom.Node, java.io.Serializable, oracle.xml.parser.v2.XMLConstants

Description

This class implements the DOM Comment interface.

See Also

org.w3c.dom.Comment, NodeFactory, setNodeFactory(NodeFactory)

Member Summary 

 

Constructors 

 

XMLComment(String) 

Creates a new Comment node. 

Inherited Member Summary 

Fields inherited from class XMLNode 

AMP, ASTERISK, ATTRDECL, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, ELEMENTDECL, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface Node 

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

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class oracle.xml.parser.v2.CharData 

appendData, deleteData, getData, getLength, insertData, replaceData, setData, setNodeValue, substringData 

Methods inherited from class XMLNode 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), print(OutputStream), print(OutputStream, String), print(PrintWriter), removeChild(Node), replaceChild(Node, Node), selectNodes(String, NSResolver), selectSingleNode(String, NSResolver), transformNode(XSLStylesheet), valueOf(String, NSResolver) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface CharacterData 

appendData(String), deleteData(int, int), getData(), getLength(), insertData(int, String), replaceData(int, int, String), setData(String), substringData(int, int) 

Methods inherited from interface Node 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), removeChild(Node), replaceChild(Node, Node), setNodeValue(String) 

Constructor

XMLComment(String)

public  XMLComment(java.lang.String text)

Creates a new Comment node.

Parameters

text - Text of the comment node


XMLDocument

Syntax

public class XMLDocument extends XMLNode implements org.w3c.dom.Document, 
java.io.Serializable
 
java.lang.Object
  |
  +--XMLNode
        |
        +--oracle.xml.parser.v2.XMLDocument

All Implemented Interfaces

java.lang.Cloneable, org.w3c.dom.Document, org.w3c.dom.Node, 
java.io.Serializable, oracle.xml.parser.v2.XMLConstants

Description

This class implements the DOM Document interface, represents an entire XML document and serves the root of the Document Object Model tree. Each XML tag can either represent a node or a leaf of this tree.

According to the XML specification, the root of the tree consists of any combination of comments and processing instructions, but only one root element. A helper method getDocumentElement is provided as a short cut to finding the root element.

Member Summary 

 

Constructors 

 

XMLDocument() 

Creates an empty document. 

Methods 

 

cloneNode(boolean) 

Returns a duplicate of this document node. 

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. 

expectedElements(Element) 

Returns vector of element names that can be appended to the element. 

getDoctype() 

The Document Type Declaration (DTD) 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. 

getEncoding() 

Retrieves the character encoding information. 

getImplementation() 

The DOMImplementation object that handles this document. 

getOwnerDocument() 

The Document object associated with this node. 

getStandalone() 

Retrieves the standalone information. 

getVersion() 

Retrieves the version information. 

print(OutputStream) 

Writes the contents of this document to the given output stream. 

print(OutputStream, String) 

Writes the contents of this document to the given output stream. 

print(PrintWriter) 

Writes the contents of this document to the given output stream. 

printExternalDTD(OutputStream) 

Writes the contents of this document to the given output stream. 

printExternalDTD(OutputStream, String) 

Writes the contents of the external DTD to the given output stream. 

printExternalDTD(PrintWriter) 

Writes the contents of this document to the given output stream. 

replaceChild(Node, Node) 

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

setEncoding(String) 

Sets the character encoding for output. 

setLocale(Locale) 

Sets the locale for error reporting 

setStandalone(String) 

Sets the standalone information stored in the <?xml ...?> tag. 

setVersion(String) 

Sets the version number stored in the <?xml ...?> tag. 

validateElementContent(Element) 

Validates the content of a element node. 

Inherited Member Summary 

Fields inherited from class XMLNode 

AMP, ASTERISK, ATTRDECL, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, ELEMENTDECL, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface Node 

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

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class XMLNode 

appendChild(Node), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), removeChild(Node), selectNodes(String, NSResolver), selectSingleNode(String, NSResolver), setNodeValue(String), transformNode(XSLStylesheet), valueOf(String, NSResolver) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface Node 

appendChild(Node), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), removeChild(Node), setNodeValue(String) 

Constructor

XMLDocument()

public  XMLDocument()

Creates an empty document.

Methods

cloneNode(boolean)

public org.w3c.dom.Node cloneNode(boolean deep)

Returns a duplicate of this document node.

Specified By

org.w3c.dom.Node.cloneNode(boolean) in interface org.w3c.dom.Node

Overrides

cloneNode(boolean) in class XMLNode

Parameters

deep - If true, recursively clone the subtree under the document; if false, clone only the document itself

Returns

The duplicate document node.

createAttribute(String)

public org.w3c.dom.Attr createAttribute(java.lang.String name)

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

Specified By

org.w3c.dom.Document.createAttribute(String) in interface org.w3c.dom.Document

Parameters

name - The name of the attribute.

Returns

A new Attr object.

Throws

org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.

createCDATASection(String)

public org.w3c.dom.CDATASection createCDATASection(java.lang.String data)

Creates a CDATASection node whose value is the specified string.

Specified By

org.w3c.dom.Document.createCDATASection(String) in interface org.w3c.dom.Document

Parameters

data - The data for the CDATASection contents.

Returns

The new CDATASection object.

Throws

org.w3c.dom.DOMException - A DOMException could be thrown.

createComment(String)

public org.w3c.dom.Comment createComment(java.lang.String data)

Creates a Comment node given the specified string.

Specified By

org.w3c.dom.Document.createComment(String) in interface org.w3c.dom.Document

Parameters

data - The data for the node.

Returns

The new Comment object.

createDocumentFragment()

public org.w3c.dom.DocumentFragment createDocumentFragment()

Creates an empty DocumentFragment object.

Specified By

org.w3c.dom.Document.createDocumentFragment() in interface org.w3c.dom.Document

Returns

A new DocumentFragment.

createElement(String)

public org.w3c.dom.Element createElement(java.lang.String tagName)

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.

Specified By

org.w3c.dom.Document.createElement(String) in interface org.w3c.dom.Document

Parameters

tagName - The name of the element type to instantiate. The name is treated as case-sensitive.

Returns

A new Element object.

Throws

org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.

createEntityReference(String)

public org.w3c.dom.EntityReference createEntityReference(java.lang.String name)

Creates an EntityReference object.

Specified By

org.w3c.dom.Document.createEntityReference(String) in interface org.w3c.dom.Document

Parameters

name - The name of the entity to reference.

Returns

The new EntityReference object.

Throws

org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.

createProcessingInstruction(String, String)

public org.w3c.dom.ProcessingInstruction 
createProcessingInstruction(java.lang.String target, java.lang.String data)

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

Specified By

org.w3c.dom.Document.createProcessingInstruction(String, String) in interface org.w3c.dom.Document

Parameters

target - The target part of the processing instruction.

data - The data for the node.

Returns

The new ProcessingInstruction object.

Throws

org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if an invalid character is specified.

createTextNode(String)

public org.w3c.dom.Text createTextNode(java.lang.String data)

Creates a Text node given the specified string.

Specified By

org.w3c.dom.Document.createTextNode(String) in interface org.w3c.dom.Document

Parameters

data - The data for the node.

Returns

The new Text object.

expectedElements(Element)

public java.util.Vector expectedElements(org.w3c.dom.Element e)

Returns vector of element names that can be appended to the element.

Parameters

e - Element

Returns

Vector of names

getDoctype()

public org.w3c.dom.DocumentType getDoctype()

The Document Type Declaration (DTD) associated with this document. For XML documents without a DTD, this returns null. Note that the DOM Level 1 specification does not support editing the DTD.

Specified By

org.w3c.dom.Document.getDoctype() in interface org.w3c.dom.Document

Returns

The associated DTD

See Also

org.w3c.dom.DocumentType

getDocumentElement()

public org.w3c.dom.Element getDocumentElement()

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

Specified By

org.w3c.dom.Document.getDocumentElement() in interface org.w3c.dom.Document

Returns

The root element

getElementsByTagName(String)

public org.w3c.dom.NodeList getElementsByTagName(java.lang.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.

Specified By

org.w3c.dom.Document.getElementsByTagName(String) in interface org.w3c.dom.Document

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.

getEncoding()

public final java.lang.String getEncoding()

Retrieves the character encoding information.

Returns

the encoding information stored in the <?xml ...?> tag or the user-defined output encoding if it has been more recently set.

getImplementation()

public org.w3c.dom.DOMImplementation getImplementation()

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

Specified By

org.w3c.dom.Document.getImplementation() in interface org.w3c.dom.Document

Returns

The associated DOM implementation.

getOwnerDocument()

public org.w3c.dom.Document getOwnerDocument()

The Document object associated with this node. Since this node is a Document this is null.

Specified By

org.w3c.dom.Node.getOwnerDocument() in interface org.w3c.dom.Node

Overrides

getOwnerDocument() in class XMLNode

Returns

null

getStandalone()

public final java.lang.String getStandalone()

Retrieves the standalone information.

Returns

the standalone attribute stored in the <?xml ...?> tag.

getVersion()

public final java.lang.String getVersion()

Retrieves the version information.

Returns

the version number stored in the <?xml ...?> tag.

print(OutputStream)

public void print(java.io.OutputStream out)

Writes the contents of this document to the given output stream.

Overrides

print(OutputStream) in class XMLNode

Parameters

out - OutputStream to write to

Throws

IOException - if an error occurs

print(OutputStream, String)

public void print(java.io.OutputStream out, java.lang.String enc)

Writes the contents of this document to the given output stream.

Overrides

print(OutputStream, String) in class XMLNode

Parameters

out - OutputStream to write to

enc - Encoding to use for the output

Throws

IOException - if an invalid encoding was specified or if any other error occurs

print(PrintWriter)

public void print(java.io.PrintWriter out)

Writes the contents of this document to the given output stream.

Overrides

print(PrintWriter) in class XMLNode

Parameters

out - PrintWriter to write to

Throws

IOException - if an error occurs

printExternalDTD(OutputStream)

public void printExternalDTD(java.io.OutputStream out)

Writes the contents of this document to the given output stream.

Parameters

out - OutputStream to write to

Throws

IOException - if an error occurs

printExternalDTD(OutputStream, String)

public void printExternalDTD(java.io.OutputStream out, java.lang.String enc)

Writes the contents of the external DTD to the given output stream.

Parameters

out - OutputStream to write to

enc - Encoding to use for the output

Throws

IOException - if an invalid encoding was specified or if any other error occurs

printExternalDTD(PrintWriter)

public void printExternalDTD(java.io.PrintWriter out)

Writes the contents of this document to the given output stream.

Parameters

out - PrintWriter to write to

Throws

IOException - if an error occurs

replaceChild(Node, Node)

public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, 
org.w3c.dom.Node oldChild)

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. This is an override of the XMLNode.removeChild method

Specified By

org.w3c.dom.Node.replaceChild(Node, Node) in interface org.w3c.dom.Node

Overrides

replaceChild(Node, Node) in class XMLNode

Parameters

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

oldChild - The node being replaced in the list.

Returns

The node replaced.

Throws

org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node. WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than this one. NOT_FOUND_ERR: Raised if oldChild is not a child of this node.

setEncoding(String)

public final void setEncoding(java.lang.String encoding)

Sets the character encoding for output. Eventually it sets the ENCODING stored in the <?xml ...?> tag, but not until the document is saved. You should not call this method until the Document has been loaded.

Parameters

encoding - The character encoding to set

setLocale(Locale)

public final void setLocale(java.util.Locale locale)

Sets the locale for error reporting

Parameters

locale - Locale for error reporting.

setStandalone(String)

public final void setStandalone(java.lang.String value)

Sets the standalone information stored in the <?xml ...?> tag.

Parameters

value - The attribute value ('yes' or 'no').

setVersion(String)

public final void setVersion(java.lang.String version)

Sets the version number stored in the <?xml ...?> tag.

Parameters

version - The version information to set.

validateElementContent(Element)

public boolean validateElementContent(org.w3c.dom.Element e)

Validates the content of a element node.

Parameters

e - Element to be validated

Returns

True if valid, else false


XMLDocumentFragment

Syntax

public class XMLDocumentFragment extends XMLNode implements 
org.w3c.dom.DocumentFragment, java.io.Serializable
 
java.lang.Object
  |
  +--XMLNode
        |
        +--oracle.xml.parser.v2.XMLDocumentFragment

All Implemented Interfaces

java.lang.Cloneable, org.w3c.dom.DocumentFragment, org.w3c.dom.Node, 
java.io.Serializable, oracle.xml.parser.v2.XMLConstants

Description

This class implements the DOM DocumentFragment interface.

See Also

org.w3c.dom.DocumentFragment, NodeFactory, setNodeFactory(NodeFactory)

Member Summary 

 

Constructors 

 

XMLDocumentFragment() 

Creates an empty document fragment 

Methods 

 

getParentNode() 

Gets the parent of this node 

Inherited Member Summary 

Fields inherited from class XMLNode 

AMP, ASTERISK, ATTRDECL, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, ELEMENTDECL, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface Node 

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

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class XMLNode 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), print(OutputStream), print(OutputStream, String), print(PrintWriter), removeChild(Node), replaceChild(Node, Node), selectNodes(String, NSResolver), selectSingleNode(String, NSResolver), setNodeValue(String), transformNode(XSLStylesheet), valueOf(String, NSResolver) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface Node 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), removeChild(Node), replaceChild(Node, Node), setNodeValue(String) 

Constructor

XMLDocumentFragment()

public  XMLDocumentFragment()

Creates an empty document fragment

Methods

getParentNode()

public org.w3c.dom.Node getParentNode()

Gets the parent of this node

Specified By

org.w3c.dom.Node.getParentNode() in interface org.w3c.dom.Node

Overrides

getParentNode() in class XMLNode

Returns

The parent of this node (always null)


XMLDocumentHandler

Syntax

public interface XMLDocumentHandler extends org.xml.sax.DocumentHandler

All Superinterfaces

org.xml.sax.DocumentHandler

All Known Implementing Classes

Package oracle.xml.parser.v2

Description

This interface extends the org.xml.sax.DocumentHandler interface. SAX Applications requiring Namespace support must implement this interface and register with the SAX Parser via Parser.setDocumentHandler().

Member Summary 

 

Methods 

 

cDATASection(char[ ], int, int) 

Receive notification of a CDATA Section. 

comment(String) 

Receive notification of a comment. 

endDoctype() 

Receive notification of end of the DTD. 

endElement(NSName) 

Receive notification of the end of an element. 

setDoctype(DTD) 

Receive notification of a DTD (Document Type node). 

setTextDecl(String, String) 

Receive notification of a Text XML Declaration. 

setXMLDecl(String, String, String) 

Receive notification of a XML Declaration. 

startElement(NSName, SAXAttrList) 

Receive notification of the beginning of an element. 

Inherited Member Summary 

Methods inherited from interface DocumentHandler 

characters(char[], int, int), endDocument(), endElement(String), ignorableWhitespace(char[], int, int), processingInstruction(String, String), setDocumentLocator(Locator), startDocument(), startElement(String, AttributeList) 

Methods

cDATASection(char[ ], int, int)

public void cDATASection(char[] ch, int start, int length)

Receive notification of a CDATA Section.

The Parser will invoke this method once for each CDATA Section found.

Parameters

ch - The CDATA section characters.

start - The start position in the character array.

length - The number of characters to use from the character array.

Throws

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

comment(String)

public void comment(java.lang.String data)

Receive notification of a comment.

The Parser will invoke this method once for each comment found note that comment may occur before or after the main document element.

Parameters

data - The comment data, or null if none was supplied.

Throws

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

endDoctype()

public void endDoctype()

Receive notification of end of the DTD.

Throws

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

endElement(NSName)

public void endElement(NSName elem)

Receive notification of the end of an element. The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding startElement() event for every endElement() event (even when the element is empty).

By implementing this method instead of org.xml.sax.DocumentHandler.endElement, SAX Applications can get the Namespace support provided by NSName.

Parameters

elem - NSName object

Throws

org.xml.sax.SAXException - A SAXException could be thrown.

See Also:

org.xml.sax.DocumentHandler.endElement(String) 

setDoctype(DTD)

public void setDoctype(DTD dtd)

Receive notification of a DTD (Document Type node).

The Parser will invoke this method after calling startDocument to register the DTD used.

Parameters

DTD - The DTD node

Throws

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

setTextDecl(String, String)

public void setTextDecl(java.lang.String version, java.lang.String encoding)

Receive notification of a Text XML Declaration.

The Parser will invoke this method once for each text XML Decl

Parameters

version - The version number (or null, if not specified)

encoding - The encoding name

Throws

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

setXMLDecl(String, String, String)

public void setXMLDecl(java.lang.String version, java.lang.String standalone, 
java.lang.String encoding)

Receive notification of a XML Declaration.

The Parser will invoke this method once for XML Decl

Parameters

version - The version number

standalone - The standalone value (or null, if not specifed)

encoding - The encoding name (or null, if not specifed)

Throws

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

startElement(NSName, SAXAttrList)

public void startElement(NSName elem, SAXAttrList attrlist)

Receive notification of the beginning of an element. The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding endElement() event for every startElement() event (even when the element is empty). All of the element's content will be reported, inorder, before the corresponding endElement() event.

By implementing this method instead of org.xml.sax.DocumentHandler.startElement, SAX Applications can get the Namespace support provided by NSName and SAXAttrList.

Parameters

elem - NSName object

attrlist - SAXAttrList for the element

Throws

org.xml.sax.SAXException - A SAXException could be thrown.

See Also

org.xml.sax.DocumentHandler.startElement(String, AttributeList):


XMLElement

Syntax

public class XMLElement extends XMLNode implements org.w3c.dom.Element, 
java.io.Serializable, NSName, NSResolver
 
java.lang.Object
  |
  +--XMLNode
        |
        +--oracle.xml.parser.v2.XMLElement

All Implemented Interfaces

ava.lang.Cloneable, org.w3c.dom.Element, org.w3c.dom.Node, NSName, NSResolver, java.io.Serializable, oracle.xml.parser.v2.XMLConstants

Description

This class implements the DOM Element interface. Elements are created by the XML parser using the default NodeFactory or the user defined NodeFactory if registered using setNodeFactoty() method.

See Also: org.w3c.dom.Element, XMLParser, NodeFactory, setNodeFactory(NodeFactory):  

Member Summary 

 

Constructors 

 

XMLElement(String) 

Creates an element with the given name 

XMLElement(String, String, String) 

Creates an element with the given name, prefix, and namespace 

Methods 

 

checkNamespace(String, String) 

Returns if the element belongs to the namespace specified. 

cloneNode(boolean) 

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

getAttribute(String) 

Retrieves an attribute value by name. 

getAttributeNode(String) 

Retrieves an Attr node by name. 

getAttributes() 

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

getChildrenByTagName(String) 

Returns a NodeList of all immediate children with a given tag name, 

getChildrenByTagName(String, String) 

Returns a NodeList of all immediate children with a given tag name and namespace 

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. 

getElementsByTagName(String, String) 

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

getExpandedName() 

Get the fully resolved name for this element. 

getLocalName() 

Get the local Name for this element. 

getNamespace() 

Get the resolved Namespace for this element. 

getPrefix() 

Get the namespace prefix for this element. 

getQualifiedName() 

Get the qualified name for this element. 

getTagName() 

Gets 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. 

resolveNamespacePrefix(String) 

Given a namespace prefix, find the namespace definition in scope in this element. 

setAttribute(String, String) 

Adds a new attribute. 

setAttributeNode(Attr) 

Adds a new attribute. 

Inherited Member Summary 

Fields inherited from class XMLNode 

AMP, ASTERISK, ATTRDECL, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, ELEMENTDECL, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface Node 

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

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class XMLNode 

appendChild(Node), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), print(OutputStream), print(OutputStream, String), print(PrintWriter), removeChild(Node), replaceChild(Node, Node), selectNodes(String, NSResolver), selectSingleNode(String, NSResolver), setNodeValue(String), transformNode(XSLStylesheet), valueOf(String, NSResolver) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface Node 

appendChild(Node), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), removeChild(Node), replaceChild(Node, Node), setNodeValue(String) 

Constructor

XMLElement(String)

public  XMLElement(java.lang.String tag)

Creates an element with the given name

XMLElement(String, String, String)

public  XMLElement(java.lang.String name, java.lang.String prefix, 
java.lang.String namespace)

Creates an element with the given name, prefix, and namespace

Methods

checkNamespace(String, String)

public boolean checkNamespace(java.lang.String localname, java.lang.String ns)

Returns if the element belongs to the namespace specified.

Parameters

ns - Expanded namespace string

Returns

true - if the element belongs to the namespace

cloneNode(boolean)

public org.w3c.dom.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.

Specified By

org.w3c.dom.Node.cloneNode(boolean) in interface org.w3c.dom.Node

Specified By

org.w3c.dom.Node.cloneNode(boolean) in interface org.w3c.dom.Node

Overrides

cloneNode(boolean) in class XMLNode

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.

getAttribute(String)

public java.lang.String getAttribute(java.lang.String name)

Retrieves an attribute value by name.

Specified By

org.w3c.dom.Element.getAttribute(String) in interface org.w3c.dom.Element

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.

getAttributeNode(String)

public org.w3c.dom.Attr getAttributeNode(java.lang.String name)

Retrieves an Attr node by name.

Specified By

org.w3c.dom.Element.getAttributeNode(String) in interface org.w3c.dom.Element

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.

getAttributes()

public org.w3c.dom.NamedNodeMap getAttributes()

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

Specified By

org.w3c.dom.Node.getAttributes() in interface org.w3c.dom.Node

Overrides

getAttributes() in class XMLNode

Returns

The list of attributes of this element

getChildrenByTagName(String)

public org.w3c.dom.NodeList getChildrenByTagName(java.lang.String name)

Returns a NodeList of all immediate children with a given tag name,

Parameters

name - The name of the tag to match on.

Returns

A list of matching children

getChildrenByTagName(String, String)

public org.w3c.dom.NodeList getChildrenByTagName(java.lang.String name, 
java.lang.String ns)

Returns a NodeList of all immediate children with a given tag name and namespace

Parameters

name - The name of the tag to match on. (should be local name)

ns - The name space

Returns

A list of matching children

getElementsByTagName(String)

public org.w3c.dom.NodeList getElementsByTagName(java.lang.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.

Specified By

org.w3c.dom.Element.getElementsByTagName(String) in interface org.w3c.dom.Element

Parameters

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

Returns

A list of matching Element nodes.

getElementsByTagName(String, String)

public org.w3c.dom.NodeList getElementsByTagName(java.lang.String name, 
java.lang.String ns)

Returns a NodeList of all descendant elements with a given tag name, and namespace 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. (should be local name)

ns - The namespace of the elements

Returns

A list of matching Element nodes.

getExpandedName()

public java.lang.String getExpandedName()

Get the fully resolved name for this element.

Specified By

getExpandedName() in interface NSName

Returns

the fully resolved name

getLocalName()

public java.lang.String getLocalName()

Get the local Name for this element.

Specified By

getLocalName() in interface NSName

Returns

the local Name

getNamespace()

public java.lang.String getNamespace()

Get the resolved Namespace for this element.

Specified By

getNamespace() in interface NSName

Returns

the resolved Namespace

getPrefix()

public java.lang.String getPrefix()

Get the namespace prefix for this element.

Specified By

getPrefix() in interface NSName

Returns

the namespace prefix

getQualifiedName()

public java.lang.String getQualifiedName()

Get the qualified name for this element.

Specified By

getQualifiedName() in interface NSName

Returns

the qualified name

getTagName()

public java.lang.String getTagName()

Gets 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.

Specified By

org.w3c.dom.Element.getTagName() in interface org.w3c.dom.Element

Returns

The element name

normalize()

public 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 doc1ument tree structure are to be used.

Specified By

org.w3c.dom.Element.normalize() in interface org.w3c.dom.Element

removeAttribute(String)

public void removeAttribute(java.lang.String name)

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

Specified By

org.w3c.dom.Element.removeAttribute(String) in interface org.w3c.dom.Element

Parameters

name - The name of the attribute to remove.

Throws

org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

removeAttributeNode(Attr)

public org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr oldAttr)

Removes the specified attribute.

Specified By

org.w3c.dom.Element.removeAttributeNode(Attr) in interface org.w3c.dom.Element

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

org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. NOT_FOUND_ERR: Raised if oldAttr is not an attribute of the element.

resolveNamespacePrefix(String)

public java.lang.String resolveNamespacePrefix(java.lang.String prefix)

Given a namespace prefix, find the namespace definition in scope in this element.

Specified By

resolveNamespacePrefix(String) in interface NSResolver

Parameters

prefix - Namespace prefix to be resolved

Returns

the resolved Namespace (null, if prefix could not be resolved)

setAttribute(String, String)

public void setAttribute(java.lang.String name, java.lang.String value)

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.

Specified By

org.w3c.dom.Element.setAttribute(String, String) in interface org.w3c.dom.Element

Parameters

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

value - Value to set in string form.

Throws

org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

setAttributeNode(Attr)

public org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr newAttr)

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

Specified By

org.w3c.dom.Element.setAttributeNode(Attr) in interface org.w3c.dom.Element

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

org.w3c.dom.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 readonly. 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.


XMLEntityReference

Syntax

public class XMLEntityReference extends XMLNode implements 
org.w3c.dom.EntityReference, oracle.xml.parser.v2.XMLConstants, 
java.lang.Cloneable, java.io.Serializable
 
java.lang.Object
  |
  +--XMLNode
        |
        +--oracle.xml.parser.v2.XMLEntityReference

All Implemented Interfaces

java.lang.Cloneable, org.w3c.dom.EntityReference, org.w3c.dom.Node, 
java.io.Serializable, oracle.xml.parser.v2.XMLConstants

Description

Member Summary 

 

Constructors 

 

XMLEntityReference(String) 

 

Inherited Member Summary 

Fields inherited from class XMLNode 

AMP, ASTERISK, ATTRDECL, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, ELEMENTDECL, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface Node 

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

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class XMLNode 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), print(OutputStream), print(OutputStream, String), print(PrintWriter), removeChild(Node), replaceChild(Node, Node), selectNodes(String, NSResolver), selectSingleNode(String, NSResolver), setNodeValue(String), transformNode(XSLStylesheet), valueOf(String, NSResolver) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface Node 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), removeChild(Node), replaceChild(Node, Node), setNodeValue(String) 

Constructor

XMLEntityReference(String)

public  XMLEntityReference(java.lang.String tag)

XMLNode

Syntax

public class XMLNode extends java.lang.Object implements org.w3c.dom.Node, 
oracle.xml.parser.v2.XMLConstants, java.lang.Cloneable, java.io.Serializable
 
java.lang.Object
  |
  +--oracle.xml.parser.v2.XMLNode

Direct Known Subclasses

AttrDecl, oracle.xml.parser.v2.CharData, DTD, ElementDecl, XMLAttr, XMLDocument, 
XMLDocumentFragment, XMLElement, XMLEntityReference

All Implemented Interfaces

java.lang.Cloneable, org.w3c.dom.Node, java.io.Serializable, 
oracle.xml.parser.v2.XMLConstants

Description

Implements the DOM Node interface and serves as the primary datatype for the entire Document Object Model. It represents a single node in the document tree.

The attributes nodeName, nodeValue and attributes are included as a mechanism to get at node information without casting down to the specific derived instance. 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 derived classes may contain additional and more convenient mechanisms to get and set the relevant information.

Member Summary 

 

Fields 

 

ATTRDECL 

A attribute declaration node 

ELEMENTDECL 

An element declaration node. 

Methods 

 

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

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

getChildNodes() 

Gets a NodeList that contains all children of this node. 

getFirstChild() 

Gets the first child of this node. 

getLastChild() 

Gets the last child of this node. 

getNextSibling() 

Gets The node immediately following this node. 

getNodeName() 

Gets the name of this node, depending on its type 

getNodeType() 

Gets a code representing the type of the underlying object 

getNodeValue() 

Gets the value of this node, depending on its type 

getOwnerDocument() 

Gets the Document object associated with this node. 

getParentNode() 

Gets the parent of this node. 

getPreviousSibling() 

Gets 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

print(OutputStream) 

Writes the contents of this node to the given output stream. 

print(OutputStream, String) 

Writes the contents of this node to the given output stream. 

print(PrintWriter) 

Writes the contents of this node using the given print writer. 

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. 

selectNodes(String, NSResolver) 

Selects nodes from the tree which match the given pattern 

selectSingleNode(String, NSResolver) 

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

setNodeValue(String) 

Sets the value of this node, depending on its type 

transformNode(XSLStylesheet) 

Transforms a node in the tree using the given stylesheet 

valueOf(String, NSResolver) 

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

Inherited Member Summary 

Fields inherited from interface Node 

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

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Fields

ATTRDECL

public static final short ATTRDECL

A attribute declaration node

ELEMENTDECL

public static final short ELEMENTDECL

An element declaration node.

Methods

appendChild(Node)

public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)

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.

Specified By

org.w3c.dom.Node.appendChild(Node) in interface org.w3c.dom.Node

Parameters

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

org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to append is one of this node's ancestors. WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

cloneNode(boolean)

public org.w3c.dom.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.

Specified By

org.w3c.dom.Node.cloneNode(boolean) in interface org.w3c.dom.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.

getAttributes()

public org.w3c.dom.NamedNodeMap getAttributes()

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

Specified By

org.w3c.dom.Node.getAttributes() in interface org.w3c.dom.Node

Returns

the attributes of this node

getChildNodes()

public org.w3c.dom.NodeList getChildNodes()

Gets 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.

Specified By

org.w3c.dom.Node.getChildNodes() in interface org.w3c.dom.Node

Returns

The children of this node

getFirstChild()

public org.w3c.dom.Node getFirstChild()

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

Specified By

org.w3c.dom.Node.getFirstChild() in interface org.w3c.dom.Node

Returns

The first child of this node

getLastChild()

public org.w3c.dom.Node getLastChild()

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

Specified By

org.w3c.dom.Node.getLastChild() in interface org.w3c.dom.Node

Returns

The last child of this node

getNextSibling()

public org.w3c.dom.Node getNextSibling()

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

Specified By

org.w3c.dom.Node.getNextSibling() in interface org.w3c.dom.Node

Returns

the next node

getNodeName()

public java.lang.String getNodeName()

Gets the name of this node, depending on its type

Specified By

org.w3c.dom.Node.getNodeName() in interface org.w3c.dom.Node

Returns

Name of this node

getNodeType()

public short getNodeType()

Gets a code representing the type of the underlying object

Specified By

org.w3c.dom.Node.getNodeType() in interface org.w3c.dom.Node

Returns

type of the node

getNodeValue()

public java.lang.String getNodeValue()

Gets the value of this node, depending on its type

Specified By

org.w3c.dom.Node.getNodeValue() in interface org.w3c.dom.Node

Returns

Value of this node

Throws

org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

getOwnerDocument()

public org.w3c.dom.Document getOwnerDocument()

Gets 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.

Specified By

org.w3c.dom.Node.getOwnerDocument() in interface org.w3c.dom.Node

Returns

The document associated with this node

getParentNode()

public org.w3c.dom.Node getParentNode()

Gets 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.

Specified By

org.w3c.dom.Node.getParentNode() in interface org.w3c.dom.Node

Returns

The parent of this node

getPreviousSibling()

public org.w3c.dom.Node getPreviousSibling()

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

Specified By

org.w3c.dom.Node.getPreviousSibling() in interface org.w3c.dom.Node

Returns

the previous node

hasChildNodes()

public boolean hasChildNodes()

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

Specified By

org.w3c.dom.Node.hasChildNodes() in interface org.w3c.dom.Node

Returns

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

insertBefore(Node, Node)

public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, 
org.w3c.dom.Node refChild)

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.

Specified By

org.w3c.dom.Node.insertBefore(Node, Node) in interface org.w3c.dom.Node

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

org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to insert is one of this node's ancestors. WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. NOT_FOUND_ERR: Raised if refChild is not a child of this node.

print(OutputStream)

public void print(java.io.OutputStream out)

Writes the contents of this node to the given output stream.

Parameters

out - OutputStream to write to

Throws

IOException - if an error occurs

print(OutputStream, String)

public void print(java.io.OutputStream out, java.lang.String enc)

Writes the contents of this node to the given output stream.

Parameters

out - OutputStream to write to

enc - Encoding to use for the output

Throws

IOException - if an invalid encoding was specified or if any other error occurs

print(PrintWriter)

public void print(java.io.PrintWriter out)

Writes the contents of this node using the given print writer.

Parameters

out - PrintWriter to use

Throws

IOException - if an error occurs

removeChild(Node)

public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)

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

Specified By

org.w3c.dom.Node.removeChild(Node) in interface org.w3c.dom.Node

Parameters

oldChild - The node being removed.

Returns

The node removed.

Throws

org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. NOT_FOUND_ERR: Raised if oldChild is not a child of this node.

replaceChild(Node, Node)

public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, 
org.w3c.dom.Node oldChild)

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.

Specified By

org.w3c.dom.Node.replaceChild(Node, Node) in interface org.w3c.dom.Node

Parameters

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

oldChild - The node being replaced in the list.

Returns

The node replaced.

Throws

org.w3c.dom.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 readonly. NOT_FOUND_ERR: Raised if oldChild is not a child of this node.

selectNodes(String, NSResolver)

public org.w3c.dom.NodeList selectNodes(java.lang.String pattern, NSResolver 
nsr)

Selects nodes from the tree which match the given pattern

Parameters

pattern - XSL pattern to match

nsr - NSResolver to resolve any prefixes that occur in given pattern

Returns

a list of matching nodes

Throws

XSLException - Raised if there is an error while doing the match

selectSingleNode(String, NSResolver)

public org.w3c.dom.Node selectSingleNode(java.lang.String pattern, NSResolver 
nsr)

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

Parameters

pattern - XSL pattern to match

nsr - NSResolver to resolve any prefixes that occur in given pattern

Returns

matching node

Throws

XSLException - Raised if there is an error while doing the match

setNodeValue(String)

public void setNodeValue(java.lang.String nodeValue)

Sets the value of this node, depending on its type

Specified By

org.w3c.dom.Node.setNodeValue(String) in interface org.w3c.dom.Node

Throws

org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

transformNode(XSLStylesheet)

public org.w3c.dom.DocumentFragment transformNode(XSLStylesheet xsl)

Transforms a node in the tree using the given stylesheet

Parameters

xsl - XSLStylesheet to be used for transformation

Returns

a document fragment

Throws

XSLException - Raised if there is an error while doing the XSL transformation.

valueOf(String, NSResolver)

public java.lang.String valueOf(java.lang.String pattern, NSResolver nsr)

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

Parameters

pattern - XSL pattern to match

nsr - NSResolver to resolve any prefixes that occur in given pattern

Returns

value of the matching node

Throws

XSLException - Raised if there is an error while doing the match


XMLParseException

Syntax

public class XMLParseException extends org.xml.sax.SAXParseException
 
java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.xml.sax.SAXException
                    |
                    +--org.xml.sax.SAXParseException
                          |
                          +--oracle.xml.parser.v2.XMLParseException

All Implemented Interfaces

java.io.Serializable

Description

Indicates that a parsing exception occurred while processing an XML document

Member Summary 

 

Fields 

 

ERROR 

Code for non-fatal error 

FATAL_ERROR 

Code for fatal error 

WARNING 

Code for warning 

Constructors 

 

XMLParseException(String, String, String, int, int, int) 

 

Methods 

 

getColumnNumber(int) 

Get the column number of error at specified index 

getException(int) 

Get the exception (if exists) that occured in error at specified index 

getLineNumber(int) 

Get the line number of error at specified index 

getMessage(int) 

Get the error message at specified index 

getMessageType(int) 

Get the type of the error message at specified index 

getNumMessages() 

Return the total number of errors/warnings found during parsing 

getPublicId(int) 

Get the public ID of input when error at specified index occured 

getSystemId(int) 

Get the system ID of input when error at specified index occured 

Inherited Member Summary 

Methods inherited from interface SAXParseException 

getColumnNumber(), getLineNumber(), getPublicId(), getSystemId() 

Methods inherited from interface SAXException 

getException(), getMessage(), toString() 

Methods inherited from class java.lang.Throwable 

fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 

Fields

ERROR

public static final int ERROR

Code for non-fatal error

FATAL_ERROR

public static final int FATAL_ERROR

Code for fatal error

WARNING

public static final int WARNING

Code for warning

Constructor

XMLParseException(String, String, String, int, int, int)

public  XMLParseException(java.lang.String mesg, java.lang.String pubId, 
java.lang.String sysId, int line, int col, int type)

Methods

getColumnNumber(int)

public int getColumnNumber(int i)

Get the column number of error at specified index

Returns

The column number

getException(int)

public java.lang.Exception getException(int i)

Get the exception (if exists) that occured in error at specified index

Returns

The exception

getLineNumber(int)

public int getLineNumber(int i)

Get the line number of error at specified index

Returns

The line number

getMessage(int)

public java.lang.String getMessage(int i)

Get the error message at specified index

Returns

The error message

getMessageType(int)

public int getMessageType(int i)

Get the type of the error message at specified index

Returns

The error message type

getNumMessages()

public int getNumMessages()

Return the total number of errors/warnings found during parsing

Returns

The number of errors/warnings

getPublicId(int)

public java.lang.String getPublicId(int i)

Get the public ID of input when error at specified index occured

Returns

The public ID

getSystemId(int)

public java.lang.String getSystemId(int i)

Get the system ID of input when error at specified index occured

Returns

The system ID


XMLParser

Syntax

public abstract class XMLParser extends java.lang.Object implements 
oracle.xml.parser.v2.XMLConstants
 
java.lang.Object
  |
  +--oracle.xml.parser.v2.XMLParser

Direct Known Subclasses

DOMParser, SAXParser

All Implemented Interfaces

oracle.xml.parser.v2.XMLConstants

Description

This class serves as a base class for the DOMParser and SAXParser classes. It contains methods to parse eXtensible Markup Language (XML) 1.0 documents according to the World Wide Web Consortium (W3C) recommendation. This class can not be instantiated (applications may use the DOM or SAX parser depending on their requirements).

Member Summary 

 

Methods 

 

getReleaseVersion() 

Returns the release version of the Oracle XML Parser 

getValidationMode() 

Returns the validation mode 

parse(InputSource) 

Parses the XML from given input source 

parse(InputStream) 

Parses the XML from given input stream. 

parse(Reader) 

Parses the XML from given input stream. 

parse(String) 

Parses the XML from the URL indicated 

parse(URL) 

Parses the XML document pointed to by the given URL and creates the corresponding XML document hierarchy. 

setBaseURL(URL) 

Set the base URL for loading external enitites and DTDs. 

setDoctype(DTD) 

Set the DTD 

setLocale(Locale) 

Applications can use this to set the locale for error reporting. 

setPreserveWhitespace(boolean) 

Set the white space preserving mode 

setValidationMode(boolean) 

Set the validation mode 


Inherited Member Summary 

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods

getReleaseVersion()

public static java.lang.String getReleaseVersion()

Returns the release version of the Oracle XML Parser

Returns

the release version string

getValidationMode()

public boolean getValidationMode()

Returns the validation mode

Returns

true if the XML parser is validating false if not

parse(InputSource)

public final void parse(org.xml.sax.InputSource in)

Parses the XML from given input source

Parameters

in - the org.xml.sax.InputSouce to parse

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

parse(InputStream)

public final void parse(java.io.InputStream in)

Parses the XML from given input stream. The base URL should be set for resolving external entities and DTD.

Parameters

in - the InputStream containing XML data to parse.

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

See Also: setBaseURL(URL):  

parse(Reader)

public final void parse(java.io.Reader r)

Parses the XML from given input stream. The base URL should be set for resolving external entities and DTD.

Parameters

r - the Reader containing XML data to parse.

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

See Also

setBaseURL(URL)

parse(String)

public final void parse(java.lang.String in)

Parses the XML from the URL indicated

Parameters

in - the String containing the URL to parse from

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

parse(URL)

public final void parse(java.net.URL url)

Parses the XML document pointed to by the given URL and creates the corresponding XML document hierarchy.

Parameters

url - the url points to the XML document to parse.

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

setBaseURL(URL)

public void setBaseURL(java.net.URL url)

Set the base URL for loading external enitites and DTDs. This method should to be called if the parse(InputStream) is used to parse the XML Document

Parameters

url - The base URL

setDoctype(DTD)

public void setDoctype(DTD dtd)

Set the DTD

Parameters

dtd - DTD to set and used while parsing

setLocale(Locale)

public void setLocale(java.util.Locale locale)

Applications can use this to set the locale for error reporting.

Parameters

locale - Locale to set

Throws

org.xml.sax.SAXException - A SAXException could be thrown.

See Also

org.xml.sax.Parser.setLocale(Locale)

setPreserveWhitespace(boolean)

public void setPreserveWhitespace(boolean flag)

Set the white space preserving mode

Parameters

flag - preserving mode

setValidationMode(boolean)

public void setValidationMode(boolean yes)

Set the validation mode

Parameters

yes - determines whether the XML parser should be validating


XMLPI

Syntax

public class XMLPI extends oracle.xml.parser.v2.CharData implements 
org.w3c.dom.ProcessingInstruction, java.io.Serializable
 
java.lang.Object
  |
  +--XMLNode
        |
        +--oracle.xml.parser.v2.CharData
              |
              +--oracle.xml.parser.v2.XMLPI

All Implemented Interfaces

org.w3c.dom.CharacterData, java.lang.Cloneable, org.w3c.dom.Node, 
org.w3c.dom.ProcessingInstruction, java.io.Serializable, 
oracle.xml.parser.v2.XMLConstants

Description

This class implements the DOM Processing Instruction interface.

See Also

org.w3c.dom.ProcessingInstruction, NodeFactory, setNodeFactory(NodeFactory)

Member Summary 

 

Constructors 

 

XMLPI(String, String) 

Creates a new ProcessingInstruction node with the given target and the data. 

Methods 

 

getTarget() 

Returns the target of this PI. 

Inherited Member Summary 

Fields inherited from class XMLNode 

AMP, ASTERISK, ATTRDECL, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, ELEMENTDECL, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface Node 

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

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class oracle.xml.parser.v2.CharData 

appendData, deleteData, getData, getLength, insertData, replaceData, setData, setNodeValue, substringData 

Methods inherited from class XMLNode 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), print(OutputStream), print(OutputStream, String), print(PrintWriter), removeChild(Node), replaceChild(Node, Node), selectNodes(String, NSResolver), selectSingleNode(String, NSResolver), transformNode(XSLStylesheet), valueOf(String, NSResolver) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface ProcessingInstruction 

getData(), setData(String) 

Methods inherited from interface Node 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getNodeValue(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), removeChild(Node), replaceChild(Node, Node), setNodeValue(String) 

Methods inherited from interface CharacterData 

appendData(String), deleteData(int, int), getLength(), insertData(int, String), replaceData(int, int, String), substringData(int, int) 

Constructor

XMLPI(String, String)

public  XMLPI(java.lang.String target, java.lang.String data)

Creates a new ProcessingInstruction node with the given target and the data.

Parameters

target - The target of this PI

data - The content of this PI

Methods

getTarget()

public java.lang.String getTarget()

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

Specified By

org.w3c.dom.ProcessingInstruction.getTarget() in interface org.w3c.dom.ProcessingInstruction

Returns

The target of the PI.


XMLText

Syntax

public class XMLText extends oracle.xml.parser.v2.CharData implements 
org.w3c.dom.Text, java.io.Serializable
 
java.lang.Object
  |
  +--XMLNode
        |
        +--oracle.xml.parser.v2.CharData
              |
              +--oracle.xml.parser.v2.XMLText

Direct Known Subclasses:

XMLCDATA

All Implemented Interfaces

org.w3c.dom.CharacterData, java.lang.Cloneable, org.w3c.dom.Node, 
java.io.Serializable, org.w3c.dom.Text, oracle.xml.parser.v2.XMLConstants

Description

This class implements the DOM Text interface.

See Also

org.w3c.dom.Text, NodeFactory, setNodeFactory(NodeFactory)

Member Summary 

 

Constructors 

 

XMLText(String) 

 

Methods 

 

getNodeValue() 

 

splitText(int) 

Breaks Text node into two Text nodes at specified offset, so they are both siblings, and the node only contains content up to the offset. 


Inherited Member Summary 

Fields inherited from class XMLNode 

AMP, ASTERISK, ATTRDECL, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, ELEMENTDECL, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Fields inherited from interface Node 

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

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class oracle.xml.parser.v2.CharData 

appendData, deleteData, getData, getLength, insertData, replaceData, setData, setNodeValue, substringData 

Methods inherited from class XMLNode 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(), getNodeName(), getNodeType(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), print(OutputStream), print(OutputStream, String), print(PrintWriter), removeChild(Node), replaceChild(Node, Node), selectNodes(String, NSResolver), selectSingleNode(String, NSResolver), transformNode(XSLStylesheet), valueOf(String, NSResolver) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface CharacterData 

appendData(String), deleteData(int, int), getData(), getLength(), insertData(int, String), replaceData(int, int, String), setData(String), substringData(int, int) 

Methods inherited from interface Node 

appendChild(Node), cloneNode(boolean), getAttributes(), getChildNodes(), getFirstChild(), getLastChild(), getNextSibling(),getNodeName(), getNodeType(), getOwnerDocument(), getParentNode(), getPreviousSibling(), hasChildNodes(), insertBefore(Node, Node), removeChild(Node), replaceChild(Node, Node), setNodeValue(String) 

Constructor

XMLText(String)

public  XMLText(java.lang.String text)

Methods

getNodeValue()

public java.lang.String getNodeValue()

Specified By

org.w3c.dom.Node.getNodeValue() in interface org.w3c.dom.Node

Overrides

getNodeValue() in class XMLNode

splitText(int)

public org.w3c.dom.Text splitText(int offset)

Breaks Text node into two Text nodes at specified offset, so they are both siblings, and the node only contains content up to the offset. New node inserted as next sibling contains all content at and after the offset point.

Specified By

org.w3c.dom.Text.splitText(int) in interface org.w3c.dom.Text

Parameters

offset - Offset at which to split, starting from 0

Returns

New Text node

Throws

org.w3c.dom.DOMException - INDEX_SIZE_ERR: Raised if specified offset is negative or greater than number of characters in data. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.


XMLToken

Syntax

public interface XMLToken

Description

Basic interface for XMLToken

All XMLParser applications with Tokenizer feature must implement this interface. The interface has to be registered using XMLParser method setTokenHandler(XMLToken handler).

If XMLtoken handler != null then for each registered and found token the parser calls the XMLToken call-back method token(int token, String value). During tokenizing the parser doesn't validate the document and doesn't include/read internal/external entities. If XMLtoken handler == null then the parser parses as usual.

A request for XML token is registered (on/off) using XMLParser method setToken (int token, boolean set). The requests could be registered during the parsing (from inside the call-back method) as well.

The XML tokens are defined as public constants in XMLToken interface. They correspond to the XML syntax variables from W3C XML Syntax Specification.

Member Summary 

 

Fields 

 

AttListDecl 

AttListDecl ::= '<' '!' 'ATTLIST' S Name AttDef* S? '>' 

AttName 

AttName ::= Name  

Attribute 

Attribute ::= AttName Eq AttValue  

AttValue 

AttValue ::= '"' ([^<&"] | Reference)* '"'  

CDSect 

CDSect ::= CDStart CData CDEnd  

CharData 

CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)  

Comment 

Comment ::= '<' '!' '--' ((Char - '-') | ('-' (Char - '-')))* '-->'  

DTDName 

DTDName ::= name 

ElemDeclName 

ElemDeclName ::= name  

elementdecl 

elementdecl ::= '<' '!ELEMENT' S ElemDeclName S contentspec S? '>'  

EmptyElemTag 

EmptyElemTag ::= '<' STagName (S Attribute)* S? '/' '>'  

EntityDecl 

EntityDecl ::= '<' '!' ENTITY' S EntityDeclName S EntityDef S? '>'  

EntityDeclName 

EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'  

EntityValue 

EntityDeclName ::= Name  

ETag 

ETag ::= '<' '/' ETagName S? '>'  

ETagName 

ETagName ::= Name  

ExternalID 

ExternalID ::= 'SYSTEM' S SystemLiteral  

NotationDecl 

NotationDecl ::= '<' '!NOTATION' S Name S (ExternalID | PublicID) S? '>'  

PI 

PI ::= '<' '?' PITarget (S (Char* - (Char* '?>' Char*)))? '?' '>'  

PITarget 

PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) 

Reference 

Reference ::= EntityRef | CharRef | PEReference  

STag 

STag ::= '<' STagName (S Attribute)* S? '>' 

STagName 

STagName ::= Name  

TextDecl 

TextDecl ::= '<' '?' 'xml' VersionInfo? EncodingDecl S? '?>'  

XMLDecl 

XMLDecl ::= '<' '?' 'xml' VersionInfo EncodingDecl? SDDecl? S? '?' '>' 

Methods 

 

token(int, String) 

The interface call-back method. 

Fields

AttListDecl

public static final int AttListDecl

AttListDecl ::= '<' '!' 'ATTLIST' S Name AttDef* S? '>'

AttName

public static final int AttName

AttName ::= Name

Attribute

public static final int Attribute

Attribute ::= AttName Eq AttValue

AttValue

public static final int AttValue

AttValue ::= '"' ([^<&"] | Reference)* '"'

| "'" ([^<&'] | Reference)* "'"

CDSect

public static final int CDSect

CDSect ::= CDStart CData CDEnd

CDStart ::= '<' '!' '[CDATA['

CData ::= (Char* - (Char* ']]>' Char*))

CDEnd ::= ']]>'

CharData

public static final int CharData

CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)

Comment

public static final int Comment

Comment ::= '<' '!' '--' ((Char - '-') | ('-' (Char - '-')))* '-->'

DTDName

public static final int DTDName

DTDName ::= name

ElemDeclName

public static final int ElemDeclName

ElemDeclName ::= name

elementdecl

public static final int elementdecl

elementdecl ::= '<' '!ELEMENT' S ElemDeclName S contentspec S? '>'

EmptyElemTag

public static final int EmptyElemTag

EmptyElemTag ::= '<' STagName (S Attribute)* S? '/' '>'

EntityDecl

public static final int EntityDecl

EntityDecl ::= '<' '!' ENTITY' S EntityDeclName S EntityDef S? '>'

| '<' '!' ENTITY' S '%' S EntityDeclName S PEDef S? '>'

EntityDef ::= EntityValue | (ExternalID NDataDecl?)

PEDef ::= EntityValue | ExternalID

EntityDeclName

public static final int EntityDeclName

EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'

| "'" ([^%&'] | PEReference | Reference)* "'"

EntityValue

public static final int EntityValue

EntityDeclName ::= Name

ETag

public static final int ETag

ETag ::= '<' '/' ETagName S? '>'

ETagName

public static final int ETagName

ETagName ::= Name

ExternalID

public static final int ExternalID

ExternalID ::= 'SYSTEM' S SystemLiteral

| 'PUBLIC' S PubidLiteral S SystemLiteral

NotationDecl

public static final int NotationDecl

NotationDecl ::= '<' '!NOTATION' S Name S (ExternalID | PublicID) S? '>'

PI

public static final int PI

PI ::= '<' '?' PITarget (S (Char* - (Char* '?>' Char*)))? '?' '>'

PITarget

public static final int PITarget

PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

Reference

public static final int Reference

Reference ::= EntityRef | CharRef | PEReference

EntityRef ::= '&' Name ';'

PEReference ::= '%' Name ';'

CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';

STag

public static final int STag

STag ::= '<' STagName (S Attribute)* S? '>'

STagName

public static final int STagName

STagName ::= Name

TextDecl

public static final int TextDecl

TextDecl ::= '<' '?' 'xml' VersionInfo? EncodingDecl S? '?>'

XMLDecl

public static final int XMLDecl

XMLDecl ::= '<' '?' 'xml' VersionInfo EncodingDecl? SDDecl? S? '?' '>'

Methods

token(int, String)

public void token(int token, java.lang.String value)

The interface call-back method. Receives an XML token and it's corresponding value

Parameters

token - The XML token constant as specified in the interface.

value - The corresponding substring from the parsed text.


XMLTokenizer

Syntax

public class XMLTokenizer extends Package oracle.xml.parser.v2 implements 
oracle.xml.parser.v2.XMLConstants
 
java.lang.Object
  |
  +--org.xml.sax.HandlerBase
        |
        +--Package oracle.xml.parser.v2
              |
              +--oracle.xml.parser.v2.XMLTokenizer

All Implemented Interfaces

org.xml.sax.DocumentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, 
org.xml.sax.ErrorHandler, oracle.xml.parser.v2.XMLConstants, XMLDocumentHandler

Description

This class implements an eXtensible Markup Language (XML) 1.0 parser according to the World Wide Web Consortium (W3C) recommendation.

Member Summary 

 

Constructors 

 

XMLTokenizer() 

Creates a new Tokenizer object. 

XMLTokenizer(XMLToken) 

Creates a new Tokenizer object. 

Methods 

 

parseDocument() 

Document ::= Prolog Element Misc* 

setErrorHandler(ErrorHandler) 

Applications can use this to register a new error event handler. 

setErrorStream(OutputStream) 

Register a output stream for errors 

setToken(int, boolean) 

Applications can use this to register a new token for XML tokenizer. 

setTokenHandler(XMLToken) 

Applications can use this to register a new XML tokenizer event handler. 

tokenize(InputSource) 

Tokenizes the XML from given input source 

tokenize(InputStream) 

Tokenizes the XML from given input stream. 

tokenize(Reader) 

Tokenizes the XML from given input stream. 

tokenize(String) 

Tokenizes the XML from the URL indicated 

tokenize(URL) 

Tokenizes the XML document pointed to by the given URL and creates the corresponding XML document hierarchy. 

Inherited Member Summary 

Fields inherited from interface oracle.xml.parser.v2.XMLConstants 

AMP, ASTERISK, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DOUBLEQUOTE, EOF, EQ, ERROR, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SEMICOLON, SLASH, TAGEND, TAGSTART, VALIDATING, WARNING 

Methods inherited from class Package oracle.xml.parser.v2 

cDATASection(char[], int, int), comment(String), endDoctype(), endElement(NSName), setDoctype(DTD), setTextDecl(String, String), setXMLDecl(String, String, String), startElement(NSName, SAXAttrList) 

Methods inherited from class HandlerBase 

characters(char[], int, int), endDocument(), endElement(String), error(SAXParseException), fatalError(SAXParseException), ignorableWhitespace(char[], int, int), notationDecl(String, String, String), processingInstruction(String, String), resolveEntity(String, String), setDocumentLocator(Locator), startDocument(), startElement(String, AttributeList), unparsedEntityDecl(String, String, String, String), warning(SAXParseException) 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Methods inherited from interface XMLDocumentHandler 

cDATASection(char[ ], int, int), comment(String), endDoctype(), endElement(NSName), setDoctype(DTD), setTextDecl(String, String), setXMLDecl(String, String, String), startElement(NSName, SAXAttrList) 

Methods inherited from interface DocumentHandler 

characters(char[], int, int), endDocument(), endElement(String), ignorableWhitespace(char[], int, int), processingInstruction(String, String), setDocumentLocator(Locator), startDocument(), startElement(String, AttributeList) 

Methods inherited from interface EntityResolver 

resolveEntity(String, String) 

Methods inherited from interface DTDHandler 

notationDecl(String, String, String), unparsedEntityDecl(String, String, String, String) 

Methods inherited from interface ErrorHandler 

error(SAXParseException), fatalError(SAXParseException), warning(SAXParseException) 

Constructors

XMLTokenizer()

public  XMLTokenizer()

Creates a new Tokenizer object.

XMLTokenizer(XMLToken)

public  XMLTokenizer(XMLToken handler)

Creates a new Tokenizer object.

Methods

parseDocument()

public void parseDocument()

Document ::= Prolog Element Misc*

setErrorHandler(ErrorHandler)

public void setErrorHandler(org.xml.sax.ErrorHandler handler)

Applications can use this to register a new error event handler. This replaces any previous setting for error handling.

Parameters

handler - ErrorHandler being registered

setErrorStream(OutputStream)

public void setErrorStream(java.io.OutputStream out)

Register a output stream for errors

setToken(int, boolean)

public void setToken(int token, boolean val)

Applications can use this to register a new token for XML tokenizer.

Parameters

token - XMLToken being set

setTokenHandler(XMLToken)

public void setTokenHandler(XMLToken handler)

Applications can use this to register a new XML tokenizer event handler.

Parameters

handler - XMLToken being registered

tokenize(InputSource)

public final void tokenize(org.xml.sax.InputSource in)

Tokenizes the XML from given input source

Parameters

in - the org.xml.sax.InputSouce to parse

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

tokenize(InputStream)

public final void tokenize(java.io.InputStream in)

Tokenizes the XML from given input stream.

Parameters

in - the InputStream containing XML data to parse.

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

See Also

setBaseURL(URL)

tokenize(Reader)

public final void tokenize(java.io.Reader r)

Tokenizes the XML from given input stream.

Parameters

r - the Reader containing XML data to parse.

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

See Also

setBaseURL(URL)

tokenize(String)

public final void tokenize(java.lang.String in)

Tokenizes the XML from the URL indicated

Parameters

in - the String containing the URL to parse from

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.

tokenize(URL)

public final void tokenize(java.net.URL url)

Tokenizes the XML document pointed to by the given URL and creates the corresponding XML document hierarchy.

Parameters

url - the url points to the XML document to parse.

Throws

XMLParseException - if syntax or other error encountered.

org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

IOException - IO Error.


XSLException

Syntax

public class XSLException extends java.lang.Exception
 
java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--oracle.xml.parser.v2.XSLException

All Implemented Interfaces

java.io.Serializable

Description

Indicates that an exception occurred during XSL tranformation

Inherited Member Summary 

Methods inherited from class java.lang.Throwable 

fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 


XSLProcessor

Syntax

public class XSLProcessor extends java.lang.Object
 
java.lang.Object
  |
  +--oracle.xml.parser.v2.XSLProcessor

Description

This class provides methods to transform an input XML document using a previously constructed XSLStylesheet. The transformation effected is as specified by the XSLT 1.0 specification.

Member Summary 

 

Constructors 

 

XSLProcessor() 

 

Methods 

 

processXSL(XSLStylesheet, InputStream, URL) 

Transform input XML document using given InputStream and stylesheet. 

processXSL(XSLStylesheet, Reader, URL) 

Transform input XML document using given Reader and stylesheet. 

processXSL(XSLStylesheet, URL, URL) 

Transform input XML document using given URL and stylesheet. 

processXSL(XSLStylesheet, XMLDocument) 

Transform input XML document using given XMLDocument and stylesheet. 

processXSL(XSLStylesheet, XMLDocumentFragment) 

Transform input XML document using given XMLDocument and stylesheet. 

processXSL(XSLStylesheet, XMLDocumentFragment, OutputStream) 

Transform input XML using given XMLDocumentFragment and stylesheet. 

processXSL(XSLStylesheet, XMLDocumentFragment, PrintWriter) 

Transform input XML using given XMLDocumentFragment and stylesheet. 

processXSL(XSLStylesheet, XMLDocument, OutputStream) 

Transform input XML document using given XMLDocument and stylesheet. 

processXSL(XSLStylesheet, XMLDocument, PrintWriter) 

Transform input XML document using given XMLDocument and stylesheet. 

setErrorStream(OutputStream) 

Creates an output stream for the output of warnings. 

setLocale(Locale) 

Applications can use this to set the locale for error reporting. 

showWarnings(boolean) 

Switch to determine whether to output warnings. 

Inherited Member Summary 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Constructor

XSLProcessor()

public  XSLProcessor()

Methods

processXSL(XSLStylesheet, InputStream, URL)

public XMLDocumentFragment processXSL(XSLStylesheet xsl, java.io.InputStream 
xml, java.net.URL ref)

Transforms input XML document using given InputStream and stylesheet.

Parameters

xsl - XSLStylesheet to be used for transformation

xml - XML input to be transformed (as a java.io.Inputstream)

ref - Reference URL to resolve external entities in input xml file

Returns

XMLDocumentFragment

Throws

XSLException - on error.

processXSL(XSLStylesheet, Reader, URL)

public XMLDocumentFragment processXSL(XSLStylesheet xsl, java.io.Reader xml, 
java.net.URL ref)

Transform input XML document using given Reader and stylesheet.

Parameters

xsl - XSLStylesheet to be used for transformation

xml - XML input to be transformed (as a java.io.Reader)

ref - Reference URL to resolve external entities in input xml file

Returns

XMLDocumentFragment

Throws

XSLException - on error.

processXSL(XSLStylesheet, URL, URL)

public XMLDocumentFragment processXSL(XSLStylesheet xsl, java.net.URL xml, 
java.net.URL ref)

Transform input XML document using given URL and stylesheet.

Parameters

xsl - XSLStylesheet to be used for transformation

xml - XML input to be transformed (as a java.net.URL)

ref - Reference URL to resolve external entities in input xml file

Returns

XMLDocumentFragment

Throws

XSLException - on error.

processXSL(XSLStylesheet, XMLDocument)

public XMLDocumentFragment processXSL(XSLStylesheet xsl, XMLDocument xml)

Transform input XML document using given XMLDocument and stylesheet.

Parameters

xsl - XSLStylesheet to be used for transformation

xml - XML input to be transformed (as a DOM Tree)

Returns

XMLDocumentFragment

Throws

XSLException - on error.

processXSL(XSLStylesheet, XMLDocumentFragment)

public XMLDocumentFragment processXSL(XSLStylesheet xsl, XMLDocumentFragment 
inp)

Transform input XML document using given XMLDocument and stylesheet.

Parameters

xsl - XSLStylesheet to be used for transformation

xml - XML input to be transformed (as a DOM Tree)

Returns

XMLDocumentFragment

Throws

XSLException - on error.

processXSL(XSLStylesheet, XMLDocumentFragment, OutputStream)

public void processXSL(XSLStylesheet xsl, XMLDocumentFragment xml, 
java.io.OutputStream out)

Transform input XML using given XMLDocumentFragment and stylesheet.

Parameters

xsl - XSLStylesheet to be used for transformation

xml - XML input to be transformed (as a DOM Tree)

out - Outputstream to which the result is printed

Throws

XSLException, - IOException on error.

processXSL(XSLStylesheet, XMLDocumentFragment, PrintWriter)

public void processXSL(XSLStylesheet xsl, XMLDocumentFragment xml, 
java.io.PrintWriter pw)

Transform input XML using given XMLDocumentFragment and stylesheet.

Parameters

xsl - XSLStylesheet to be used for transformation

xml - XML input to be transformed (as a DOM Tree)

pw - PrintWriter to which the result is printed

Throws

XSLException, - IOException on error.

processXSL(XSLStylesheet, XMLDocument, OutputStream)

public void processXSL(XSLStylesheet xsl, XMLDocument xml, java.io.OutputStream 
out)

Transform input XML document using given XMLDocument and stylesheet.

Parameters

xsl - XSLStylesheet to be used for transformation

xml - XML input to be transformed (as a DOM Tree)

out - Outputstream to which the result is printed

Throws

XSLException, - IOException on error.

processXSL(XSLStylesheet, XMLDocument, PrintWriter)

public void processXSL(XSLStylesheet xsl, XMLDocument xml, java.io.PrintWriter 
pw)

Transform input XML document using given XMLDocument and stylesheet.

Parameters

xsl - XSLStylesheet to be used for transformation

xml - XML input to be transformed (as a DOM Tree)

pw - PrintWriter to which the result is printed

Throws

XSLException, - IOException on error.

setErrorStream(OutputStream)

public final void setErrorStream(java.io.OutputStream out)

Creates an output stream for the output of warnings. If an output stream for warnings is not specified, the processor will not output any warnings

Parameters

out - The output stream to use for errors and warnings

setLocale(Locale)

public void setLocale(java.util.Locale locale)

Applications can use this to set the locale for error reporting.

Parameters

locale - Locale to set

showWarnings(boolean)

public final void showWarnings(boolean yes)

Switch to determine whether to output warnings.

Parameters

yes - determines whether warnings should be shown By default, warnings are not output


XSLStylesheet

Syntax

public class XSLStylesheet extends java.lang.Object implements 
oracle.xml.parser.v2.XSLConstants
 
java.lang.Object
  |
  +--oracle.xml.parser.v2.XSLStylesheet

All Implemented Interfaces

oracle.xml.parser.v2.XSLConstants

Description

The class holds XSL stylesheet information such as templates, keys, variables, and attribute sets. The same stylesheet, once constructed, can be used to transform multiple XML documents.

Member Summary 

 

Constructors 

 

XSLStylesheet(InputStream, URL) 

Constructs an XSLStylesheet using the given Inputstream 

XSLStylesheet(Reader, URL) 

Constructs an XSLStylesheet using the given Reader 

XSLStylesheet(URL, URL) 

Constructs an XSLStylesheet using the given URL 

XSLStylesheet(XMLDocument, URL) 

Constructs an XSLStylesheet using the given XMLDocument 

Methods 

 

setParam(String, String) 

Sets the value of a top-level stylesheet parameter. 

Inherited Member Summary 

Fields inherited from interface oracle.xml.parser.v2.XSLConstants 

APPLY_IMPORTS, APPLY_TEMPLATES, ATTRIBUTE, ATTRIBUTE_SET, CALL_TEMPLATE, CHOOSE, COMMENT, COPY, COPY_OF, DISABLEOUTESC, ELEMENT, FOR_EACH, HREF, IF, IMPORT, INCLUDE, KEY, LOCALE, MATCH, MESSAGE, NAME, NEGINFPRIORITY, NUMBER, ORACLE_NAME, ORACLE_URL, OTHERWISE, OUTPUT, PARAM, PARAM_VARIABLE, PI, PRESERVE_SPACE, RESULT_ROOT, SORT, STRIP_SPACE, TEMPLATE, TEXT, USE, USE_ATTRIBUTE_SETS, VALUE_OF, VARIABLE, WHEN, XSL_ROOT, XSLEXTFUNCNS, XSLNAMESPACE, XSLT_SPEC_VERSION 

Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 

Constructors

XSLStylesheet(InputStream, URL)

public  XSLStylesheet(java.io.InputStream xsl, java.net.URL ref)

Constructs an XSLStylesheet using the given Inputstream

Parameters

xsl - XSL input as an Inputstream

ref - Reference URL for include, import and external entities

Throws

XSLException - on error.

XSLStylesheet(Reader, URL)

public  XSLStylesheet(java.io.Reader xsl, java.net.URL ref)

Constructs an XSLStylesheet using the given Reader

Parameters

xsl - XSL input as a Reader

ref - Reference URL for include, import and external entities

Throws

XSLException - on error.

XSLStylesheet(URL, URL)

public  XSLStylesheet(java.net.URL xsl, java.net.URL ref)

Constructs an XSLStylesheet using the given URL

Parameters

xsl - XSL input as a URL

ref - Reference URL for include, import and external entities

Throws

XSLException - on error.

XSLStylesheet(XMLDocument, URL)

public  XSLStylesheet(XMLDocument xsl, java.net.URL ref)

Constructs an XSLStylesheet using the given XMLDocument

Parameters

xsl - XSL input as a DOM Tree

ref - Reference URL for include, import

Throws

XSLException - on error.

Methods

setParam(String, String)

public void setParam(java.lang.String name, java.lang.String value)

Sets the value of a top-level stylesheet parameter. The parameter value is expected to be a valid XPath expression (note that string literal values would therefore have to be explicitly quoted).

Parameters

name - parameter name

value - parameter value as an XPath expression

Throws

XSLException - on error


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