## org.codehaus.groovy.tools.xml
Class DomToGroovy

A SAX handler for turning XML into Groovy scripts

author:
  James Strachan

author:
  paulk

Field Summary
`boolean` | `inMixed`
`List` | `keywords`
`IndentPrinter` | `out`
`String` | `qt`

Constructor Summary
`DomToGroovy(PrintWriter out)`
`DomToGroovy(IndentPrinter out)`

Method Summary
`boolean` | `checkEscaping(String localName)`
`void` | `defineNamespace(Map namespaces, String prefix, String uri)`
`Map` | `defineNamespaces(Element element, Map namespaces)`
`String` | `escapeQuote(String text)`
`String` | `getAttributeValue(Attr attribute)`
`String` | `getLocalName(Node node)`
`String` | `getTextNodeData(Text node)`
`static void` | `main(def args)`
`boolean` | `mixedContent(NodeList list)`
`static Document` | `parse(String name)`
`void` | `print(Document document)`
`void` | `print(Node node, Map namespaces, boolean endWithComma)`
`void` | `print(String text)`
`void` | `printAttributeWithPrefix(Attr attribute, StringBuffer buffer)`
`boolean` | `printAttributeWithoutPrefix(Attr attribute, boolean hasAttribute)`
`boolean` | `printAttributes(Element element)`
`void` | `printChildren(Node parent, Map namespaces)`
`void` | `printComment(Comment comment, boolean endWithComma)`
`void` | `printElement(Element element, Map namespaces, boolean endWithComma)`
`void` | `printEnd(String text, boolean endWithComma)`
`void` | `printIndent()`
`void` | `printPI(ProcessingInstruction instruction, boolean endWithComma)`
`void` | `printQuoted(String text)`
`void` | `printText(Text node, boolean endWithComma)`
`void` | `println(String text)`

Constructor Detail

### DomToGroovy

    public DomToGroovy(PrintWriter out)

### DomToGroovy

    public DomToGroovy(IndentPrinter out)

Method Detail

### checkEscaping

    boolean checkEscaping(String localName)

### defineNamespace

    void defineNamespace(Map namespaces, String prefix, String uri)

### defineNamespaces

    Map defineNamespaces(Element element, Map namespaces)

### escapeQuote

    String escapeQuote(String text)

### getAttributeValue

    String getAttributeValue(Attr attribute)

### getLocalName

    String getLocalName(Node node)

### getTextNodeData

    String getTextNodeData(Text node)

### main

    public static void main(def args)

### mixedContent

    boolean mixedContent(NodeList list)

### parse

    static Document parse(String name)

### print

    public void print(Document document)

### print

    void print(Node node, Map namespaces, boolean endWithComma)

### print

    void print(String text)

### printAttributeWithPrefix

    void printAttributeWithPrefix(Attr attribute, StringBuffer buffer)

### printAttributeWithoutPrefix

    boolean printAttributeWithoutPrefix(Attr attribute, boolean hasAttribute)

### printAttributes

    boolean printAttributes(Element element)

### printChildren

    void printChildren(Node parent, Map namespaces)

### printComment

    void printComment(Comment comment, boolean endWithComma)

### printElement

    void printElement(Element element, Map namespaces, boolean endWithComma)

### printEnd

    void printEnd(String text, boolean endWithComma)

### printIndent

    void printIndent()

### printPI

    void printPI(ProcessingInstruction instruction, boolean endWithComma)

### printQuoted

    void printQuoted(String text)

### printText

    void printText(Text node, boolean endWithComma)

### println

    void println(String text)