## groovy.util
Class XmlNodePrinter

Prints a node with all children in XML format.

author:
  Christian Stein

see:
  NodePrinter

Field Summary
`boolean` | `namespaceAware`
`IndentPrinter` | `out`
`String` | `quote`

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

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)`
`void` | `print(Node node, NamespaceContext ctx)`
`void` | `printEscaped(String s)`
`void` | `printLineBegin()`
`void` | `printLineEnd()`
`void` | `printLineEnd(String comment)`
`void` | `printList(List list, NamespaceContext ctx)`
`void` | `printName(Node node, NamespaceContext ctx, boolean begin)`
`void` | `printNameAttributes(Map attributes)`
`void` | `printNamespace(Node node, NamespaceContext ctx)`
`void` | `printSimpleItem(Object value)`
`void` | `printSimpleItemWithIndent(Object value)`
`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.

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)

### getQuote

    public String getQuote()

  Get Quote to use when printing attributes.
  return:
    the quote character

### isEmptyElement

    public boolean isEmptyElement(Node node)

### isNamespaceAware

    public boolean isNamespaceAware()

  Check if namespace handling is enabled.
  return:
    true if namespace handling is enabled

### print

    public void print(Node node)

### print

    void print(Node node, NamespaceContext ctx)

### printEscaped

    void printEscaped(String s)

### printLineBegin

    void printLineBegin()

### printLineEnd

    void printLineEnd()

### printLineEnd

    void printLineEnd(String comment)

### printList

    void printList(List list, NamespaceContext ctx)

### printName

    void printName(Node node, NamespaceContext ctx, boolean begin)

### printNameAttributes

    void printNameAttributes(Map attributes)

### printNamespace

    void printNamespace(Node node, NamespaceContext ctx)

### printSimpleItem

    void printSimpleItem(Object value)

### printSimpleItemWithIndent

    void printSimpleItemWithIndent(Object value)

### printSpecialNode

    boolean printSpecialNode(Node node)

### setNamespaceAware

    public void setNamespaceAware(boolean namespaceAware)

  Enable and/or disable namespace handling.
  param:
    namespaceAware the new desired value

### setQuote

    public void setQuote(String quote)

  Set Quote to use when printing attributes.
  param:
    quote the quote character