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

    java.lang.Object
      org.codehaus.groovy.tools.xml.DomToGroovy

    public class DomToGroovy

extends Object

A SAX handler for turning XML into Groovy scripts

Author:
  James Strachan, paulk

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

Method Summary
`protected void` `defineNamespace(Map namespaces, String prefix, String uri)`
`protected Map` `defineNamespaces(Element element, Map namespaces)`
`protected String` `getLocalName(Node node)`
`protected String` `getTextNodeData(Text node)`
`static void` `main(String[] args)`
`protected boolean` `mixedContent(NodeList list)`
`void` `print(Document document)`
`protected void` `print(Node node, Map namespaces, boolean endWithComma)`
`protected void` `print(String text)`
`protected boolean` `printAttributes(Element element)`
`protected void` `printChildren(Node parent, Map namespaces)`
`protected void` `printComment(Comment comment, boolean endWithComma)`
`protected void` `printElement(Element element, Map namespaces, boolean endWithComma)`
`protected void` `printEnd(String text, boolean endWithComma)`
`protected void` `printIndent()`
`protected void` `println(String text)`
`protected void` `printPI(ProcessingInstruction instruction, boolean endWithComma)`
`protected void` `printText(Text node, boolean endWithComma)`

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

Constructor Detail

### DomToGroovy

    public DomToGroovy(PrintWriter out)

### DomToGroovy

    public DomToGroovy(IndentPrinter out)

Method Detail

### print

    public void print(Document document)

### main

    public static void main(String[] args)

### print

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

### printElement

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

### printPI

    protected void printPI(ProcessingInstruction instruction,
                           boolean endWithComma)

### printComment

    protected void printComment(Comment comment,
                                boolean endWithComma)

### printText

    protected void printText(Text node,
                             boolean endWithComma)

### defineNamespaces

    protected Map defineNamespaces(Element element,
                                   Map namespaces)

### defineNamespace

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

### printAttributes

    protected boolean printAttributes(Element element)

### getTextNodeData

    protected String getTextNodeData(Text node)

### mixedContent

    protected boolean mixedContent(NodeList list)

### printChildren

    protected void printChildren(Node parent,
                                 Map namespaces)

### getLocalName

    protected String getLocalName(Node node)

### printEnd

    protected void printEnd(String text,
                            boolean endWithComma)

### println

    protected void println(String text)

### print

    protected void print(String text)

### printIndent

    protected void printIndent()

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