|
Project 1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcscie259.project1.mf.DefaultHandler
cscie259.project1.mf.XMLSerializer
A ContentHandler for SAX events that serializes (to an output stream) the events back into XML. Essentially, a simplified version of org.apache.xml.serialize.XMLSerializer. You MAY modify this file to provide support for the serialization of attributes.
Constructor Summary | |
XMLSerializer(java.io.BufferedWriter writer,
boolean prettyPrint)
Configures XMLSerializer with given BufferedWriter and for pretty-printedness, if applicable. |
Method Summary | |
void |
characters(java.lang.String content)
Prints out character data, pretty-printed if applicable. |
void |
endDocument()
Closes the output stream. |
void |
endElement(java.lang.String name)
Prints out the end element tag, pretty-printed if applicable, and updates the current level of indentation. |
void |
startElement(java.lang.String name,
Attributes atts)
Prints out the start element tag, pretty-printed if applicable, and updates the current level of indentation. |
Methods inherited from class cscie259.project1.mf.DefaultHandler |
startDocument |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XMLSerializer(java.io.BufferedWriter writer, boolean prettyPrint)
writer
- BufferedWriter for serializationprettyPrint
- flag indicating whether to pretty-printMethod Detail |
public void characters(java.lang.String content)
characters
in interface ContentHandler
characters
in class DefaultHandler
content
- character datapublic void endDocument()
endDocument
in interface ContentHandler
endDocument
in class DefaultHandler
public void endElement(java.lang.String name)
endElement
in interface ContentHandler
endElement
in class DefaultHandler
name
- name of elementpublic void startElement(java.lang.String name, Attributes atts)
startElement
in interface ContentHandler
startElement
in class DefaultHandler
name
- name of elementatts
- element's collection of attributes
|
Project 1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |