|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.xml.XmlUtil
public class XmlUtil
Used for pretty printing XML content.
Constructor Summary | |
---|---|
XmlUtil()
|
Method Summary | |
---|---|
private static javax.xml.transform.stream.StreamSource |
asStreamSource(java.lang.String xmlString)
|
private static java.lang.String |
asString(Writable writable)
|
static java.lang.String |
serialize(org.w3c.dom.Element element)
Return a pretty String version of the Element. |
static void |
serialize(org.w3c.dom.Element element,
java.io.OutputStream os)
Write a pretty version of the Element to the OutputStream. |
private static void |
serialize(javax.xml.transform.Source source,
java.io.OutputStream os)
|
private static void |
serialize(javax.xml.transform.Source source,
javax.xml.transform.stream.StreamResult target)
|
private static void |
serialize(javax.xml.transform.Source source,
java.io.Writer w)
|
static java.lang.String |
serialize(java.lang.String xmlString)
Return a pretty version of the XML content contained in the given String. |
static void |
serialize(java.lang.String xmlString,
java.io.OutputStream os)
Write a pretty version of the given XML string to the OutputStream. |
static java.lang.String |
serialize(Writable writable)
Return a pretty String version of the XML content produced by the Writable. |
static void |
serialize(Writable writable,
java.io.OutputStream os)
Write a pretty version of the XML content produced by the Writable to the OutputStream. |
private static void |
setIndent(javax.xml.transform.TransformerFactory factory,
int indent)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlUtil()
Method Detail |
---|
public static java.lang.String serialize(org.w3c.dom.Element element)
element
- the element to serialize
public static void serialize(org.w3c.dom.Element element, java.io.OutputStream os)
element
- the element to serializeos
- the outputstream to write topublic static java.lang.String serialize(Writable writable)
writable
- the writable to serialize
public static void serialize(Writable writable, java.io.OutputStream os)
writable
- the writable to serializeos
- the outputstream to write topublic static java.lang.String serialize(java.lang.String xmlString)
xmlString
- the string to serialize
public static void serialize(java.lang.String xmlString, java.io.OutputStream os)
xmlString
- the string to serializeos
- the outputstream to write toprivate static java.lang.String asString(Writable writable)
private static javax.xml.transform.stream.StreamSource asStreamSource(java.lang.String xmlString)
private static void serialize(javax.xml.transform.Source source, java.io.OutputStream os)
private static void serialize(javax.xml.transform.Source source, java.io.Writer w)
private static void serialize(javax.xml.transform.Source source, javax.xml.transform.stream.StreamResult target)
private static void setIndent(javax.xml.transform.TransformerFactory factory, int indent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |