com.lowagie.text.xml

## Class XmlDomWriter

- java.lang.Object
- - com.lowagie.text.xml.XmlDomWriter

    public class XmlDomWriter
    extends java.lang.Object

Author:
  psoares

### Field Summary

Fields
`protected boolean` `fCanonical` Canonical output.
`protected java.io.PrintWriter` `fOut` Print writer.
`protected boolean` `fXML11` Processing XML 1.1 document.

### Constructor Summary

Constructors
Constructor and Description
`XmlDomWriter()` Default constructor.
`XmlDomWriter(boolean canonical)`

### Method Summary

Methods
`protected void` `normalizeAndPrint(char c, boolean isAttValue)` Normalizes and print the given character.
`protected void` `normalizeAndPrint(java.lang.String s, boolean isAttValue)` Normalizes and prints the given string.
`void` `setCanonical(boolean canonical)` Sets whether output is canonical.
`void` `setOutput(java.io.OutputStream stream, java.lang.String encoding)` Sets the output stream for printing.
`void` `setOutput(java.io.Writer writer)` Sets the output writer.
`protected org.w3c.dom.Attr[]` `sortAttributes(org.w3c.dom.NamedNodeMap attrs)` Returns a sorted list of attributes.
`void` `write(org.w3c.dom.Node node)` Writes the specified node, recursively.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### fOut

    protected java.io.PrintWriter fOut

Print writer.

#### fCanonical

    protected boolean fCanonical

Canonical output.

#### fXML11

    protected boolean fXML11

Processing XML 1.1 document.

### Constructor Detail

#### XmlDomWriter

    public XmlDomWriter()

Default constructor.

#### XmlDomWriter

    public XmlDomWriter(boolean canonical)

### Method Detail

#### setCanonical

    public void setCanonical(boolean canonical)

Sets whether output is canonical.

#### setOutput

    public void setOutput(java.io.OutputStream stream,
                 java.lang.String encoding)
                   throws java.io.UnsupportedEncodingException

Sets the output stream for printing.

Throws:
  `java.io.UnsupportedEncodingException`

#### setOutput

    public void setOutput(java.io.Writer writer)

Sets the output writer.

#### write

    public void write(org.w3c.dom.Node node)

Writes the specified node, recursively.

#### sortAttributes

    protected org.w3c.dom.Attr[] sortAttributes(org.w3c.dom.NamedNodeMap attrs)

Returns a sorted list of attributes.

#### normalizeAndPrint

    protected void normalizeAndPrint(java.lang.String s,
                         boolean isAttValue)

Normalizes and prints the given string.

#### normalizeAndPrint

    protected void normalizeAndPrint(char c,
                         boolean isAttValue)

Normalizes and print the given character.