|
prettyxml 1.2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdom.output.XMLOutputter
dk.hippogrif.prettyxml.PrettyXMLOutputter
An extension to JDOM's XMLOutputter
providing attribute sorting and indentation.
This code is not threadsafe, indentation level is handled with a private member.
Private methods copied from JDOM 1.0, XMLOutputter.java revision 1.112
Nested Class Summary | |
protected class |
PrettyXMLOutputter.MyNamespaceStack
|
Nested classes inherited from class org.jdom.output.XMLOutputter |
XMLOutputter.NamespaceStack |
Field Summary |
Fields inherited from class org.jdom.output.XMLOutputter |
currentFormat, preserveFormat |
Constructor Summary | |
PrettyXMLOutputter()
Creates a new instance of PrettyXMLOutputter |
|
PrettyXMLOutputter(Format format)
This will create a PrettyXMLOutputter with the specified
format characteristics. |
|
PrettyXMLOutputter(PrettyXMLOutputter that)
This will create a PrettyXMLOutputter with all the
options as set in the given PrettyXMLOutputter . |
|
PrettyXMLOutputter(XMLOutputter that)
This will create a PrettyXMLOutputter with all the
options as set in the given XMLOutputter . |
Method Summary | |
boolean |
getIndentAttributes()
|
boolean |
getSortAttributes()
|
void |
output(Document doc,
java.io.Writer out)
|
protected void |
printAttributes(java.io.Writer out,
java.util.List attributes,
Element parent,
XMLOutputter.NamespaceStack namespaces)
|
protected void |
printElement(java.io.Writer out,
Element element,
int level,
XMLOutputter.NamespaceStack namespaces)
|
void |
setIndentAttributes(boolean indentAttributes)
Controls indentation of attributes, default is no indentation. |
void |
setSortAttributes(boolean sortAttributes)
Controls sorting of attributes, default is no sorting. |
Methods inherited from class org.jdom.output.XMLOutputter |
clone, escapeAttributeEntities, escapeElementEntities, getFormat, output, output, output, output, output, output, output, output, output, output, output, output, output, output, output, output, output, outputElementContent, outputElementContent, outputString, outputString, outputString, outputString, outputString, outputString, outputString, outputString, outputString, printCDATA, printComment, printDeclaration, printDocType, printEntityRef, printProcessingInstruction, printText, setFormat, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PrettyXMLOutputter()
public PrettyXMLOutputter(Format format)
PrettyXMLOutputter
with the specified
format characteristics. Note the format object is cloned internally
before use.
format
- the format to clonepublic PrettyXMLOutputter(XMLOutputter that)
PrettyXMLOutputter
with all the
options as set in the given XMLOutputter
.
that
- an XMLOutputterpublic PrettyXMLOutputter(PrettyXMLOutputter that)
PrettyXMLOutputter
with all the
options as set in the given PrettyXMLOutputter
.
that
- a PrettyXMLOutputterMethod Detail |
public void setSortAttributes(boolean sortAttributes)
sortAttributes
- true iff attributes shall be sortedpublic boolean getSortAttributes()
public void setIndentAttributes(boolean indentAttributes)
indentAttributes
- true iff attributes shall be indentedpublic boolean getIndentAttributes()
protected void printElement(java.io.Writer out, Element element, int level, XMLOutputter.NamespaceStack namespaces) throws java.io.IOException
java.io.IOException
protected void printAttributes(java.io.Writer out, java.util.List attributes, Element parent, XMLOutputter.NamespaceStack namespaces) throws java.io.IOException
java.io.IOException
public void output(Document doc, java.io.Writer out) throws java.io.IOException
java.io.IOException
|
prettyxml 1.2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |