|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.marre.xml.TextXmlWriter
XmlWriter that creates text xml documents. NOTE! Not completed yet.
Field Summary | |
protected boolean |
myCharsAddedBetweenTags
Used by addElement to insert a \r\n. |
protected java.util.Stack |
myTagStack
Stack of tags. |
protected java.io.Writer |
myWriter
The writer that is used internally to store the xml document. |
Constructor Summary | |
TextXmlWriter(java.io.Writer writer)
Constructor. |
Method Summary | |
void |
addCharacters(char[] ch,
int start,
int length)
Adds characters to the xml document. |
void |
addCharacters(java.lang.String str)
Adds a string to the xml document. |
void |
addEmptyElement(java.lang.String tag)
Adds an empty start element tag. |
void |
addEmptyElement(java.lang.String tag,
XmlAttribute[] attribs)
Adds an empty start element tag with attributes. |
void |
addEndElement()
Adds an end tag. |
void |
addStartElement(java.lang.String tag)
Adds a start element tag. |
void |
addStartElement(java.lang.String tag,
XmlAttribute[] attribs)
Adds a start element tag. |
void |
flush()
Flushes the writer. |
void |
setDoctype(java.lang.String publicID)
Sets the doctype. |
void |
setDoctype(java.lang.String name,
java.lang.String systemURI)
Sets the doctype. |
void |
setDoctype(java.lang.String name,
java.lang.String publicID,
java.lang.String publicURI)
Sets the doctype. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.Writer myWriter
protected java.util.Stack myTagStack
protected boolean myCharsAddedBetweenTags
Constructor Detail |
public TextXmlWriter(java.io.Writer writer)
writer
- The writer to write to.Method Detail |
public void setDoctype(java.lang.String publicID)
setDoctype
in interface XmlWriter
publicID
- XML public IDXmlWriter.setDoctype(java.lang.String)
public void setDoctype(java.lang.String name, java.lang.String systemURI)
setDoctype
in interface XmlWriter
name
- NamesystemURI
- System URIXmlWriter.setDoctype(java.lang.String, java.lang.String)
public void setDoctype(java.lang.String name, java.lang.String publicID, java.lang.String publicURI)
setDoctype
in interface XmlWriter
name
- NamepublicID
- PublicIDpublicURI
- PublicURIXmlWriter.setDoctype(java.lang.String, java.lang.String, java.lang.String)
public void addStartElement(java.lang.String tag) throws java.io.IOException
addStartElement
in interface XmlWriter
tag
- tag
java.io.IOException
- io errorXmlWriter.addStartElement(java.lang.String)
public void addStartElement(java.lang.String tag, XmlAttribute[] attribs) throws java.io.IOException
addStartElement
in interface XmlWriter
tag
- Tagattribs
- Attributes
java.io.IOException
- io errorXmlWriter.addStartElement(java.lang.String, org.marre.xml.XmlAttribute[])
public void addEmptyElement(java.lang.String tag) throws java.io.IOException
addEmptyElement
in interface XmlWriter
tag
- Tag
java.io.IOException
- io errorXmlWriter.addEmptyElement(java.lang.String)
public void addEmptyElement(java.lang.String tag, XmlAttribute[] attribs) throws java.io.IOException
addEmptyElement
in interface XmlWriter
tag
- Tagattribs
- Attributes
java.io.IOException
- io errorXmlWriter.addEmptyElement(java.lang.String, org.marre.xml.XmlAttribute[])
public void addEndElement() throws java.io.IOException
addEndElement
in interface XmlWriter
java.io.IOException
- io errorXmlWriter.addEndElement()
public void addCharacters(char[] ch, int start, int length) throws java.io.IOException
addCharacters
in interface XmlWriter
ch
- The chars to addstart
- Start offset of the ch array.length
- Number of chars to add
java.io.IOException
- io errorXmlWriter.addCharacters(char[], int, int)
public void addCharacters(java.lang.String str) throws java.io.IOException
addCharacters
in interface XmlWriter
str
- Text to add
java.io.IOException
- io errorXmlWriter.addCharacters(java.lang.String)
public void flush() throws java.io.IOException
flush
in interface XmlWriter
java.io.IOException
- io errorXmlWriter.flush()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |