|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | 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 |
Type | Method |
---|---|
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. |
XMLNode |
getCurrentNode()
Get the current node being build |
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 |
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 |
Constructor Detail |
public DocumentBuilder()
Method Detail |
public void startElement(NSName elem, SAXAttrList attrlist) throws SAXException
elem
- NSName objectattrlist
- SAXAttrList for the elementSAXException
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
namespaceURI
- 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.endElement(oracle.xml.parser.v2.NSName)
,
Attributes
public void endElement(NSName elem) throws SAXException
elem
- NSName objectSAXException
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
namespaceURI
- 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.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.
locator
- A locator for all SAX document events.DocumentHandler.setDocumentLocator(org.xml.sax.Locator)
,
Locator
public Locator getLocator()
public XMLDocument getDocument()
public XMLNode getCurrentNode()
public void startDocument() throws SAXException
DocumentHandler.startDocument()
public void endDocument() throws SAXException
DocumentHandler.endDocument()
public void setDoctype(DTD dtd) throws SAXException
dtd
- set the DTD for the documentpublic void endDoctype() throws SAXException
public void characters(char[] ch, int start, int length) throws SAXException
ch
- The characters.start
- The start position in the character array.length
- The number of characters to use from the
character array.DocumentHandler.characters(char[], int, int)
public void cDATASection(char[] ch, int start, int length) throws SAXException
ch
- The CDATA characters.start
- The start position in the character array.length
- The number of characters to use from the
character array.DocumentHandler.characters(char[], int, int)
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ch
- The whitespace characters.start
- The start position in the character array.length
- The number of characters to use from the
character array.DocumentHandler.ignorableWhitespace(char[], int, int)
public void processingInstruction(java.lang.String target, java.lang.String data) throws SAXException
target
- The processing instruction target.data
- The processing instruction data, or null if
none is supplied.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
version
- The version numberstandalone
- The standalone value (or null, if not specifed)encoding
- The encoding name (or null, if not specifed)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
version
- The version number (or null, if not specified)encoding
- The encoding namepublic void comment(java.lang.String data) throws SAXException
data
- The comment data, or null if
none was supplied.public void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws SAXException
name
- 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.endDTD()
,
startEntity(java.lang.String)
public void endDTD() throws SAXException
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.
name
- 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]".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
name
- The name of the entity that is ending.startEntity(java.lang.String)
public void startCDATA() throws SAXException
endCDATA()
public void endCDATA() throws SAXException
startCDATA()
public void comment(char[] ch, int start, int length) throws SAXException
ch
- 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.public void elementDecl(java.lang.String name, java.lang.String model) throws SAXException
name
- The element type name.model
- The content model as a normalized string.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
eName
- 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.public void internalEntityDecl(java.lang.String name, java.lang.String value) throws SAXException
name
- The name of the entity. If it is a parameter
entity, the name will begin with '%'.value
- The replacement text of the entity.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
name
- 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.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
- NodeFactory
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |