|
Oracle® XML Java API Reference 10g Release 1 (10.1) B12024-02 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.xml.sax.HandlerBase
|
+--oracle.xml.parser.v2.DefaultXMLDocumentHandler
|
+--oracle.xml.parser.v2.DocumentBuilder
This class implements XMLDocumentHandler (deprecated) and ContentHandler to build a DOM Tree from SAX 2.0 events. XMLDocumentHandler events are supported for backward compatibility
| Constructor Summary | |
DocumentBuilder()Default Constructor. | |
| Method Summary | |
void |
attributeDecl(java.lang.String eName, java.lang.String aName, java.lang.String type, java.lang.String valueDefault, java.lang.String value)Report an attribute type declaration. |
void |
cDATASection(char[] ch, int start, int length)Receive notification of CDATA Section data inside an element. |
void |
characters(char[] ch, int start, int length)Receive notification of character data inside an element. |
void |
comment(char[] ch, int start, int length)Report an XML comment anywhere in the document. |
void |
comment(java.lang.String data)Receive notification of a comment. |
void |
elementDecl(java.lang.String name, java.lang.String model)Report an element type declaration. |
void |
endCDATA()Report the end of a CDATA section. |
void |
endDoctype()Receive notification of end of the DTD. |
void |
endDocument()Receive notification of the end of the document. |
void |
endDTD()Report the end of DTD declarations. |
void |
endElement(NSName elem)Receive notification of the end of an element. |
void |
endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)Receive notification of the end of an element. |
void |
endEntity(java.lang.String name)Report the end of an entity. |
void |
externalEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId)Report a parsed external entity declaration. |
XMLDocument |
getDocument()Get the document being build |
Locator |
getLocator()Get the locator reported by the Reader using setDocumentLocator |
void |
ignorableWhitespace(char[] ch, int start, int length)Receive notification of ignorable whitespace in element content. |
void |
internalEntityDecl(java.lang.String name, java.lang.String value)Report an internal entity declaration. |
void |
processingInstruction(java.lang.String target, java.lang.String data)Receive notification of a processing instruction. |
void |
resetNodeFactory()Reset the NodeFactory and go back to the original behaviour. |
void |
retainCDATASection(boolean flag)Sets a flag to retain CDATA sections |
void |
setDebugMode(boolean flag)Sets a flag to turn on debug information in the document |
void |
setDoctype(DTD dtd)Receive notification of DTD Sets the DTD |
void |
setDocumentLocator(Locator locator)Receive a Locator object for document events. |
void |
setNodeFactory(NodeFactory f)Set a optional NodeFactory to be used for creating custom DOM trees |
void |
setTextDecl(java.lang.String version, java.lang.String encoding)Receive notification of a Text XML Declaration. |
void |
setXMLDecl(java.lang.String version, java.lang.String standalone, java.lang.String encoding)Receive notification of a XML Declaration. |
void |
startCDATA()Report the start of a CDATA section. |
void |
startDocument()Receive notification of the beginning of the document. |
void |
startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)Report the start of DTD declarations, if any. |
void |
startElement(NSName elem, SAXAttrList attrlist)Receive notification of the beginning of an element. |
void |
startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, Attributes atts)Receive notification of the beginning of an element. |
void |
startEntity(java.lang.String name)Report the beginning of some internal and external XML entities. |
| Methods inherited from class oracle.xml.parser.v2.DefaultXMLDocumentHandler |
endPrefixMapping, getHandler, setError, setHandler, setXMLSchema, skippedEntity, startPrefixMapping |
| Methods inherited from class org.xml.sax.HandlerBase |
endElement, error, fatalError, notationDecl, resolveEntity, startElement, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xml.sax.ContentHandler |
endPrefixMapping, skippedEntity, startPrefixMapping |
| Methods inherited from interface org.xml.sax.DocumentHandler |
endElement, startElement |
| Constructor Detail |
public DocumentBuilder()
| Method Detail |
public void startElement(NSName elem,
SAXAttrList attrlist)
throws SAXException
startElement in interface XMLDocumentHandlerstartElement in class DefaultXMLDocumentHandlerelem - NSName objectattrlist - SAXAttrList for the elementSAXException - A SAXException could be thrown.DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)
public void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
Attributes atts)
throws SAXException
startElement in interface ContentHandlerstartElement in class DefaultXMLDocumentHandlernamespaceURI - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.localName - The local name (without prefix), or the empty string if Namespace processing is not being performed.qName - The qualified name (with prefix), or the empty string if qualified names are not available.atts - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.SAXException - Any SAX exception, possibly wrapping another exception.endElement(oracle.xml.parser.v2.NSName), Attributes
public void endElement(NSName elem)
throws SAXException
endElement in interface XMLDocumentHandlerendElement in class DefaultXMLDocumentHandlerelem - NSName objectSAXException - A SAXException could be thrown.DocumentHandler.endElement(java.lang.String)
public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
throws SAXException
endElement in interface ContentHandlerendElement in class DefaultXMLDocumentHandlernamespaceURI - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.localName - The local name (without prefix), or the empty string if Namespace processing is not being performed.qName - The qualified XML 1.0 name (with prefix), or the empty string if qualified names are not available.SAXException - Any SAX exception, possibly wrapping another exception.public void setDocumentLocator(Locator locator)
By default, do nothing. Application writers may override this method in a subclass if they wish to store the locator for use with other document events.
setDocumentLocator in interface ContentHandlersetDocumentLocator in class HandlerBaselocator - A locator for all SAX document events.DocumentHandler.setDocumentLocator(org.xml.sax.Locator), Locatorpublic Locator getLocator()
public XMLDocument getDocument()
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerstartDocument in class HandlerBaseSAXException - Any SAX exception, possibly wrapping another exception.DocumentHandler.startDocument()
public void endDocument()
throws SAXException
endDocument in interface ContentHandlerendDocument in class HandlerBaseSAXException - Any SAX exception, possibly wrapping another exception.DocumentHandler.endDocument()
public void setDoctype(DTD dtd)
throws SAXException
setDoctype in interface XMLDocumentHandlersetDoctype in class DefaultXMLDocumentHandlerdtd - set the DTD for the documentSAXException - Any SAX exception, possibly wrapping another exception.
public void endDoctype()
throws SAXException
endDoctype in interface XMLDocumentHandlerendDoctype in class DefaultXMLDocumentHandlerSAXException - Any SAX exception, possibly wrapping another exception.
public void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlercharacters in class HandlerBasech - The characters.start - The start position in the character array.length - The number of characters to use from the character array.SAXException - Any SAX exception, possibly wrapping another exception.DocumentHandler.characters(char[], int, int)
public void cDATASection(char[] ch,
int start,
int length)
throws SAXException
cDATASection in interface XMLDocumentHandlercDATASection in class DefaultXMLDocumentHandlerch - The CDATA characters.start - The start position in the character array.length - The number of characters to use from the character array.SAXException - Any SAX exception, possibly wrapping another exception.DocumentHandler.characters(char[], int, int)
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerignorableWhitespace in class HandlerBasech - The whitespace characters.start - The start position in the character array.length - The number of characters to use from the character array.SAXException - Any SAX exception, possibly wrapping another exception.DocumentHandler.ignorableWhitespace(char[], int, int)
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws SAXException
processingInstruction in interface ContentHandlerprocessingInstruction in class HandlerBasetarget - The processing instruction target.data - The processing instruction data, or null if none is supplied.SAXException - Any SAX exception, possibly wrapping another exception.DocumentHandler.processingInstruction(java.lang.String, java.lang.String)
public void setXMLDecl(java.lang.String version,
java.lang.String standalone,
java.lang.String encoding)
throws SAXException
The Parser will invoke this method once for XML Decl
setXMLDecl in interface XMLDocumentHandlersetXMLDecl in class DefaultXMLDocumentHandlerversion - The version numberstandalone - The standalone value (or null, if not specifed)encoding - The encoding name (or null, if not specifed)SAXException - Any SAX exception, possibly wrapping another exception.
public void setTextDecl(java.lang.String version,
java.lang.String encoding)
throws SAXException
The Parser will invoke this method once for each text XML Decl
setTextDecl in interface XMLDocumentHandlersetTextDecl in class DefaultXMLDocumentHandlerversion - The version number (or null, if not specified)encoding - The encoding nameSAXException - Any SAX exception, possibly wrapping another exception.
public void comment(java.lang.String data)
throws SAXException
comment in interface XMLDocumentHandlercomment in class DefaultXMLDocumentHandlerdata - The comment data, or null if none was supplied.SAXException - Any SAX exception, possibly wrapping another exception.
public void startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
throws SAXException
startDTD in interface LexicalHandlername - The document type name.publicId - The declared public identifier for the external DTD subset, or null if none was declared.systemId - The declared system identifier for the external DTD subset, or null if none was declared.SAXException - The application may raise an exception.endDTD(), startEntity(java.lang.String)
public void endDTD()
throws SAXException
endDTD in interface LexicalHandlerSAXException - The application may raise an exception.startDTD(java.lang.String, java.lang.String, java.lang.String)
public void startEntity(java.lang.String name)
throws SAXException
All start/endEntity events must be properly nested.
startEntity in interface LexicalHandlername - The name of the entity. If it is a parameter entity, the name will begin with '%', and if it is the external DTD subset, it will be "[dtd]".SAXException - The application may raise an exception.endEntity(java.lang.String), DeclHandler.internalEntityDecl(java.lang.String, java.lang.String), DeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)
public void endEntity(java.lang.String name)
throws SAXException
endEntity in interface LexicalHandlername - The name of the entity that is ending.SAXException - The application may raise an exception.startEntity(java.lang.String)
public void startCDATA()
throws SAXException
startCDATA in interface LexicalHandlerSAXException - The application may raise an exception.endCDATA()
public void endCDATA()
throws SAXException
endCDATA in interface LexicalHandlerSAXException - The application may raise an exception.startCDATA()
public void comment(char[] ch,
int start,
int length)
throws SAXException
comment in interface LexicalHandlerch - An array holding the characters in the comment.start - The starting position in the array.length - The number of characters to use from the array.SAXException - The application may raise an exception.
public void elementDecl(java.lang.String name,
java.lang.String model)
throws SAXException
elementDecl in interface DeclHandlername - The element type name.model - The content model as a normalized string.SAXException - The application may raise an exception.
public void attributeDecl(java.lang.String eName,
java.lang.String aName,
java.lang.String type,
java.lang.String valueDefault,
java.lang.String value)
throws SAXException
attributeDecl in interface DeclHandlereName - The name of the associated element.aName - The name of the attribute.type - A string representing the attribute type.valueDefault - A string representing the attribute default ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if none of these applies.value - A string representing the attribute's default value, or null if there is none.SAXException - The application may raise an exception.
public void internalEntityDecl(java.lang.String name,
java.lang.String value)
throws SAXException
internalEntityDecl in interface DeclHandlername - The name of the entity. If it is a parameter entity, the name will begin with '%'.value - The replacement text of the entity.SAXException - The application may raise an exception.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String), DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void externalEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
throws SAXException
externalEntityDecl in interface DeclHandlername - The name of the entity. If it is a parameter entity, the name will begin with '%'.publicId - The declared public identifier of the entity, or null if none was declared.systemId - The declared system identifier of the entity.SAXException - The application may raise an exception.internalEntityDecl(java.lang.String, java.lang.String), DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)public void setDebugMode(boolean flag)
flag - determines whether debug info is storedpublic void retainCDATASection(boolean flag)
flag - determines whether CDATA sections are retainedpublic void setNodeFactory(NodeFactory f)
f - NodeFactorypublic void resetNodeFactory()
|
Oracle® XML Java API Reference 10g Release 1 (10.1) B12024-02 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||