groovy.xml
Class XmlUtil

java.lang.Object
  extended by groovy.xml.XmlUtil

public class XmlUtil
extends Object

Used for pretty printing XML content.


Constructor Summary
XmlUtil()
           
 
Method Summary
static String serialize(Element element)
          Return a pretty String version of the Element.
static void serialize(Element element, OutputStream os)
          Write a pretty version of the Element to the OutputStream.
static String serialize(String xmlString)
          Return a pretty version of the XML content contained in the given String.
static void serialize(String xmlString, OutputStream os)
          Write a pretty version of the given XML string to the OutputStream.
static String serialize(Writable writable)
          Return a pretty String version of the XML content produced by the Writable.
static void serialize(Writable writable, OutputStream os)
          Write a pretty version of the XML content produced by the Writable to the OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlUtil

public XmlUtil()
Method Detail

serialize

public static String serialize(Element element)
Return a pretty String version of the Element.

Parameters:
element - the element to serialize
Returns:
the pretty String representation of the element

serialize

public static void serialize(Element element,
                             OutputStream os)
Write a pretty version of the Element to the OutputStream.

Parameters:
element - the element to serialize
os - the outputstream to write to

serialize

public static String serialize(Writable writable)
Return a pretty String version of the XML content produced by the Writable.

Parameters:
writable - the writable to serialize
Returns:
the pretty String representation of the element

serialize

public static void serialize(Writable writable,
                             OutputStream os)
Write a pretty version of the XML content produced by the Writable to the OutputStream.

Parameters:
writable - the writable to serialize
os - the outputstream to write to

serialize

public static String serialize(String xmlString)
Return a pretty version of the XML content contained in the given String.

Parameters:
xmlString - the string to serialize
Returns:
the pretty String representation of the element

serialize

public static void serialize(String xmlString,
                             OutputStream os)
Write a pretty version of the given XML string to the OutputStream.

Parameters:
xmlString - the string to serialize
os - the outputstream to write to

Copyright © 2003-2010 The Codehaus. All rights reserved.