Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## calhoun.util
Class XmlUtil

    java.lang.Object
      calhoun.util.XmlUtil

    public final class XmlUtil

extends java.lang.Object

Utility functions to simplify XML. Wrapper around DOM4j.

Method Summary
`static org.dom4j.Document` | `newDocument()`
`static org.dom4j.Element` | `newElement(java.lang.String name)`
`static org.dom4j.Document` | `parseFile(java.lang.String filename)` Creates a dom4j Document from a file.
`static org.dom4j.Document` | `parseString(java.lang.String data)` Creates a dom4j Document from a text string.
`static java.lang.String` | `prettyPrint(org.dom4j.Document doc)` Pretty prints a document and returns the result as a String
`static void` | `prettyPrint(org.dom4j.Document doc, java.io.OutputStream out)` Pretty prints a document to a given OutputStream
`static void` | `prettyPrint(org.dom4j.Document doc, java.lang.String filename)` Pretty prints a document to a given filename
`static java.lang.String` | `prettyPrint(org.dom4j.Node node)` Pretty prints a dom4j Node and returns the result as a String
`static void` | `transform(java.lang.String input, java.lang.String output, java.lang.String stylesheet)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### transform

    public static void transform(java.lang.String input,
                                 java.lang.String output,
                                 java.lang.String stylesheet)

### newDocument

    public static org.dom4j.Document newDocument()

### newElement

    public static org.dom4j.Element newElement(java.lang.String name)

### parseFile

    public static org.dom4j.Document parseFile(java.lang.String filename)

  Creates a dom4j Document from a file. The filename given can be on the classpath or loaded from the filesystem. Converts exceptions into runtime ConfigExceptions.

### parseString

    public static org.dom4j.Document parseString(java.lang.String data)

  Creates a dom4j Document from a text string. Converts exceptions into runtime ErrorExceptions.

### prettyPrint

    public static java.lang.String prettyPrint(org.dom4j.Document doc)

  Pretty prints a document and returns the result as a String

### prettyPrint

    public static java.lang.String prettyPrint(org.dom4j.Node node)

  Pretty prints a dom4j Node and returns the result as a String

### prettyPrint

    public static void prettyPrint(org.dom4j.Document doc,
                                   java.io.OutputStream out)

  Pretty prints a document to a given OutputStream

### prettyPrint

    public static void prettyPrint(org.dom4j.Document doc,
                                   java.lang.String filename)

  Pretty prints a document to a given filename

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD