|
J avolution v3.7 (J2SE 1.5+) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavolution.xml.sax.WriterHandler
public class WriterHandler
This class generates xml documents from SAX2 events.
| Constructor Summary | |
|---|---|
WriterHandler()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Receives notification of character data. |
void |
endDocument()
Receives notification of the end of a document. |
void |
endElement(java.lang.CharSequence uri,
java.lang.CharSequence localName,
java.lang.CharSequence qName)
Receives notification of the end of an element. |
void |
endPrefixMapping(java.lang.CharSequence prefix)
Ends the scope of a prefix-URI mapping. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Receives notification of ignorable whitespace in element content. |
void |
processingInstruction(java.lang.CharSequence target,
java.lang.CharSequence data)
Receives notification of a processing instruction. |
void |
reset()
Resets the internal state of this object to its default values. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Receives an object for locating the origin of SAX document events. |
void |
setIndent(java.lang.CharSequence indent)
Sets the indentation sequence (default none). |
void |
setProlog(java.lang.CharSequence prolog)
Sets the prolog to write at the beginning of the xml document (default none). |
WriterHandler |
setWriter(java.io.Writer writer)
Sets the xml document writer. |
void |
skippedEntity(java.lang.CharSequence name)
Receives notification of a skipped entity. |
void |
startDocument()
Receives notification of the beginning of a document. |
void |
startElement(java.lang.CharSequence uri,
java.lang.CharSequence localName,
java.lang.CharSequence qName,
Attributes atts)
Receives notification of the beginning of an element. |
void |
startPrefixMapping(java.lang.CharSequence prefix,
java.lang.CharSequence uri)
Begins the scope of a prefix-URI Namespace mapping. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WriterHandler()
| Method Detail |
|---|
public WriterHandler setWriter(java.io.Writer writer)
writer - the document writer.
thispublic void setIndent(java.lang.CharSequence indent)
indent - a character sequence containing spaces or a tabulation character.public void setProlog(java.lang.CharSequence prolog)
prolog - the character sequence to be written at the beginning
of the document.public void reset()
Reusable
reset in interface Reusablepublic void setDocumentLocator(org.xml.sax.Locator locator)
ContentHandler
setDocumentLocator in interface ContentHandlerlocator - the document locator.
public void startDocument()
throws org.xml.sax.SAXException
ContentHandler
startDocument in interface ContentHandlerorg.xml.sax.SAXException - any SAX exception.
public void endDocument()
throws org.xml.sax.SAXException
ContentHandler
endDocument in interface ContentHandlerorg.xml.sax.SAXException - any SAX exception.
public void startPrefixMapping(java.lang.CharSequence prefix,
java.lang.CharSequence uri)
throws org.xml.sax.SAXException
ContentHandler
startPrefixMapping in interface ContentHandlerprefix - the Namespace prefix being declared.uri - the namespace URI the prefix is mapped to.
org.xml.sax.SAXException - any SAX exception.
public void endPrefixMapping(java.lang.CharSequence prefix)
throws org.xml.sax.SAXException
ContentHandler
endPrefixMapping in interface ContentHandlerprefix - the prefix that was being mapping.
org.xml.sax.SAXException - any SAX exception.
public void startElement(java.lang.CharSequence uri,
java.lang.CharSequence localName,
java.lang.CharSequence qName,
Attributes atts)
throws org.xml.sax.SAXException
ContentHandler
startElement in interface ContentHandleruri - the namespace URI, or an empty character sequence if the
element has no Namespace URI or if namespace processing is not
being performed.localName - the local name (without prefix), or an empty character
sequence if namespace processing is not being performed.qName - the qualified name (with prefix), or an empty character
sequence 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.
org.xml.sax.SAXException - any SAX exception.
public void endElement(java.lang.CharSequence uri,
java.lang.CharSequence localName,
java.lang.CharSequence qName)
throws org.xml.sax.SAXException
ContentHandler
endElement in interface ContentHandleruri - the namespace URI, or an empty character sequence if the
element has no Namespace URI or if namespace processing is not
being performed.localName - the local name (without prefix), or an empty character
sequence if namespace processing is not being performed.qName - the qualified XML 1.0 name (with prefix), or an empty
character sequence if qualified names are not available.
org.xml.sax.SAXException - any SAX exception.
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
ContentHandler
characters in interface ContentHandlerch - the characters from the XML document.start - the start position in the array.length - the number of characters to read from the array.
org.xml.sax.SAXException - any SAX exception.
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
ContentHandler
ignorableWhitespace in interface ContentHandlerch - the characters from the XML document.start - the start position in the array.length - the number of characters to read from the array.
org.xml.sax.SAXException - any SAX exception.
public void processingInstruction(java.lang.CharSequence target,
java.lang.CharSequence data)
throws org.xml.sax.SAXException
ContentHandler
processingInstruction in interface ContentHandlertarget - the processing instruction target.data - the processing instruction data, or null if
none was supplied. The data does not include any
whitespace separating it from the target.
org.xml.sax.SAXException - any SAX exception.
public void skippedEntity(java.lang.CharSequence name)
throws org.xml.sax.SAXException
ContentHandler
skippedEntity in interface ContentHandlername - the name of the skipped entity. If it is a
parameter entity, the name will begin with '%', and if
it is the external DTD subset, it will be the character sequence
"[dtd]".
org.xml.sax.SAXException - any SAX exception.
|
J avolution v3.7 (J2SE 1.5+) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||