|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.DefaultHandler | +--oracle.xml.parser.v2.XMLSAXSerializer
Class to print the document based on SAX Events
Field Summary | |
static java.lang.String |
ENCODING
Output encoding property |
static java.lang.String |
INDENT
Output Indenting |
static java.lang.String |
OMIT_XML_DECL
Print XML Declaration |
Constructor Summary | |
XMLSAXSerializer(java.io.OutputStream os)
Create a XMLSAXSerializer to print the XML to the given OutputStream |
|
XMLSAXSerializer(java.io.PrintWriter pw)
Create a XMLSAXSerializer to print the XML to the given PrintWriter |
Method Summary | |
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 |
endCDATA()
Report the end of a CDATA section. |
void |
endDocument()
Receive notification of the end of the document. |
void |
endDTD()
Report the end of DTD declarations. |
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 |
flush()
Flushes the output stream or print writer |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Receive notification of a processing instruction. |
void |
setProperty(java.lang.String property,
java.lang.Object value)
Set output printing properties |
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(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 org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ENCODING
setProperty(java.lang.String, java.lang.Object)
,
Constant Field Valuespublic static final java.lang.String INDENT
setProperty(java.lang.String, java.lang.Object)
,
Constant Field Valuespublic static final java.lang.String OMIT_XML_DECL
setProperty(java.lang.String, java.lang.Object)
,
Constant Field ValuesConstructor Detail |
public XMLSAXSerializer(java.io.PrintWriter pw)
pw
- PrintWriterpublic XMLSAXSerializer(java.io.OutputStream os)
os
- OutputStreamMethod Detail |
public void setProperty(java.lang.String property, java.lang.Object value)
property
- value
- of the propertypublic void flush() throws java.io.IOException
java.io.IOException
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
startDocument
in class DefaultHandler
SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.startDocument()
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
endDocument
in class DefaultHandler
SAXException
- Any SAX exception, possibly
wrapping another exception.ContentHandler.endDocument()
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
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(java.lang.String, java.lang.String, java.lang.String)
,
Attributes
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class DefaultHandler
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.ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
public void processingInstruction(java.lang.String target, java.lang.String data) throws SAXException
processingInstruction
in interface ContentHandler
processingInstruction
in class DefaultHandler
target
- 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 characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class DefaultHandler
ch
- 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 startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws SAXException
startDTD
in interface LexicalHandler
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.
SAXException
- The application may raise an
exception.endDTD()
,
startEntity(java.lang.String)
public void endDTD() throws SAXException
This method is intended to report the end of the DOCTYPE declaration; if the document has no DOCTYPE declaration, this method will not be invoked.
endDTD
in interface LexicalHandler
SAXException
- 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
startEntity
in interface LexicalHandler
name
- The name of the entity.
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 LexicalHandler
name
- The name of the entity that is ending.
SAXException
- The application may raise an exception.startEntity(java.lang.String)
public void startCDATA() throws SAXException
The contents of the CDATA section will be reported through
the regular characters
event; this event is intended only to report
the boundary.
startCDATA
in interface LexicalHandler
SAXException
- The application may raise an exception.endCDATA()
public void endCDATA() throws SAXException
endCDATA
in interface LexicalHandler
SAXException
- The application may raise an exception.startCDATA()
public void comment(char[] ch, int start, int length) throws SAXException
comment
in interface LexicalHandler
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.
SAXException
- The application may raise an exception.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |