|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnu.xom.Serializer
nu.xom.samples.NonRecursiveSerializer
public final class NonRecursiveSerializer
Demonstrates a serializer which, unlike
nu.xom.Serializer
, is not limited by the Java stack
size and can process arbitrarily deep documents.
Constructor Summary | |
---|---|
NonRecursiveSerializer(java.io.OutputStream out)
|
|
NonRecursiveSerializer(java.io.OutputStream out,
java.lang.String encoding)
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
|
protected void |
write(nu.xom.Element element)
Serializes an element onto the output stream using the current options. |
Methods inherited from class nu.xom.Serializer |
---|
breakLine, flush, getColumnNumber, getEncoding, getIndent, getLineSeparator, getMaxLength, getPreserveBaseURI, getUnicodeNormalizationFormC, setIndent, setLineSeparator, setMaxLength, setOutputStream, setPreserveBaseURI, setUnicodeNormalizationFormC, write, write, write, write, write, write, writeAttributes, writeAttributeValue, writeChild, writeEmptyElementTag, writeEndTag, writeEscaped, writeNamespaceDeclaration, writeNamespaceDeclarations, writeRaw, writeStartTag, writeXMLDeclaration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NonRecursiveSerializer(java.io.OutputStream out)
public NonRecursiveSerializer(java.io.OutputStream out, java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
Method Detail |
---|
protected final void write(nu.xom.Element element) throws java.io.IOException
nu.xom.Serializer
Serializes an element onto the output stream using the current
options. The result is guaranteed to be well-formed. If
element
does not have a parent element, the output
will also be namespace well-formed.
If the element is empty, this method invokes
writeEmptyElementTag
. If the element is not
empty, then:
writeStartTag
.writeChild
in order.writeEndTag
.It may break lines or add white space if the serializer has been configured to indent or use a maximum line length.
write
in class nu.xom.Serializer
element
- the Element
to serialize
java.io.IOException
- if the underlying output stream
encounters an I/O errorpublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |