|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ebmwebsourcing.easycommons.xml.XMLPrettyPrinter
public class XMLPrettyPrinter
An util class to prettify XML document
| Constructor Summary | |
|---|---|
XMLPrettyPrinter()
|
|
| Method Summary | |
|---|---|
static String |
getEncoding(Document xmlDocument)
|
static Transformer |
getTransformer(Source stylesheetSource)
Get a transformer from a stylesheet source |
static void |
prettify(InputStream in,
OutputStream out)
Prettify the xml input stream into the output stream. |
static void |
prettify(Node node,
OutputStream out)
Prettify the node into the output stream. |
static void |
prettify(Node node,
OutputStream out,
String encoding)
Prettify the node into the output stream. |
static String |
prettyPrint(Document xmlDocument)
parse the xml Document and return it pretty-printed (with correct indentations, etc..). |
static String |
prettyPrint(Element node)
parse the xml Document and return it pretty-printed (with correct indentations, etc..). |
static String |
prettyPrint(Node node)
parse the xml Document and return it pretty-printed (with correct indentations, etc..). |
static String |
prettyPrint(Node xmlDocument,
String encoding)
parse the xml String and return it pretty-printed (with correct indentations, etc..) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLPrettyPrinter()
| Method Detail |
|---|
public static String prettyPrint(Node xmlDocument,
String encoding)
xmlDocument - the xml document to pretty print. Must be non nullencoding - the encoding to use
public static String prettyPrint(Document xmlDocument)
xmlDocument - the xml document to pretty print. Must be non null
public static String prettyPrint(Element node)
xmlDocument - the xml document to pretty print. Must be non null
public static String prettyPrint(Node node)
xmlDocument - the xml document to pretty print. Must be non null
public static void prettify(Node node,
OutputStream out,
String encoding)
throws Exception
Exception
public static void prettify(Node node,
OutputStream out)
throws Exception
Exception
public static void prettify(InputStream in,
OutputStream out)
throws Exception
Exception
public static Transformer getTransformer(Source stylesheetSource)
throws TransformerConfigurationException
stylesheetSource - a stylesheet source
TransformerConfigurationException - if there is transformer configuration errorpublic static String getEncoding(Document xmlDocument)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||