• Non ci sono risultati.

FATAL_ERROR

Nel documento XML ReferenceRelease 1 (9.0.1) Oracle9 (pagine 143-157)

public static final int FATAL_ERROR Code for fatal error

WARNING

public static final int WARNING Code for warning

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 Member Summary

XMLParseException

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

XMLParseException

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

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 theDOMParser andSAXParser 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

XMLParser

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 validatingfalse if not

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 Member Summary

XMLParser

parse(InputSource)

public final void parse(org.xml.sax.InputSource in) Parses the XML from given input source

Parameters

in - theorg.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 - theInputStream 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.

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 - theReader containing XML data to parse.

See Also: setBaseURL(URL):

XMLParser

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

XMLParser

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

XMLParser

setValidationMode(boolean)

public void setValidationMode(boolean yes) Set the validation mode

Parameters

yes - determines whether the XML parser should be validating

XMLPI

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

XMLPI

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 Inherited Member Summary

XMLPI

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.

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)

Inherited Member Summary

XMLText

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) BreaksText node into two Text nodes at specified offset, so they are both siblings, and the node only contains content up to the offset.

XMLText

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

Nel documento XML ReferenceRelease 1 (9.0.1) Oracle9 (pagine 143-157)