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

## groovy.util
Class XmlNodePrinter

    java.lang.Object
      groovy.util.XmlNodePrinter

    public class XmlNodePrinter

extends Object

Prints a node with all children in XML format.

Author:
  Christian Stein
See Also:
  `NodePrinter`

Field Summary
`protected IndentPrinter` | `out`

Constructor Summary
`XmlNodePrinter()`
`XmlNodePrinter(IndentPrinter out, String quote)`
`XmlNodePrinter(PrintWriter out)`
`XmlNodePrinter(PrintWriter out, String indent)`
`XmlNodePrinter(PrintWriter out, String indent, String quote)`

Method Summary
`String` | `getNameOfNode(Node node)`
`String` | `getQuote()` Get Quote to use when printing attributes.
`boolean` | `isEmptyElement(Node node)`
`boolean` | `isNamespaceAware()` Check if namespace handling is enabled.
`void` | `print(Node node)`
`protected void` | `print(Node node, groovy.util.XmlNodePrinter.NamespaceContext ctx)`
`protected void` | `printLineBegin()`
`protected void` | `printLineEnd()`
`protected void` | `printLineEnd(String comment)`
`protected void` | `printList(List list, groovy.util.XmlNodePrinter.NamespaceContext ctx)`
`protected void` | `printName(Node node, groovy.util.XmlNodePrinter.NamespaceContext ctx, boolean begin)`
`protected void` | `printNameAttributes(Map attributes)`
`protected void` | `printNamespace(Node node, groovy.util.XmlNodePrinter.NamespaceContext ctx)`
`protected void` | `printSimpleItem(Object value)`
`protected boolean` | `printSpecialNode(Node node)`
`void` | `setNamespaceAware(boolean namespaceAware)` Enable and/or disable namespace handling.
`void` | `setQuote(String quote)` Set Quote to use when printing attributes.

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

Field Detail

### out

    protected final IndentPrinter out

Constructor Detail

### XmlNodePrinter

    public XmlNodePrinter(PrintWriter out)

### XmlNodePrinter

    public XmlNodePrinter(PrintWriter out,
                          String indent)

### XmlNodePrinter

    public XmlNodePrinter(PrintWriter out,
                          String indent,
                          String quote)

### XmlNodePrinter

    public XmlNodePrinter(IndentPrinter out,
                          String quote)

### XmlNodePrinter

    public XmlNodePrinter()

Method Detail

### getNameOfNode

    public String getNameOfNode(Node node)

### isEmptyElement

    public boolean isEmptyElement(Node node)

### print

    public void print(Node node)

### isNamespaceAware

    public boolean isNamespaceAware()

  Check if namespace handling is enabled.

  Returns:
    true if namespace handling is enabled

### setNamespaceAware

    public void setNamespaceAware(boolean namespaceAware)

  Enable and/or disable namespace handling.

  Parameters:
    `namespaceAware` - the new desired value

### getQuote

    public String getQuote()

  Get Quote to use when printing attributes.

  Returns:
    the quote character

### setQuote

    public void setQuote(String quote)

  Set Quote to use when printing attributes.

  Parameters:
    `quote` - the quote character

### print

    protected void print(Node node,
                         groovy.util.XmlNodePrinter.NamespaceContext ctx)

### printLineBegin

    protected void printLineBegin()

### printLineEnd

    protected void printLineEnd()

### printLineEnd

    protected void printLineEnd(String comment)

### printList

    protected void printList(List list,
                             groovy.util.XmlNodePrinter.NamespaceContext ctx)

### printSimpleItem

    protected void printSimpleItem(Object value)

### printName

    protected void printName(Node node,
                             groovy.util.XmlNodePrinter.NamespaceContext ctx,
                             boolean begin)

### printNameAttributes

    protected void printNameAttributes(Map attributes)

### printSpecialNode

    protected boolean printSpecialNode(Node node)

### printNamespace

    protected void printNamespace(Node node,
                                  groovy.util.XmlNodePrinter.NamespaceContext ctx)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2003-2008 The Codehaus. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD