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

## org.jboss.util.xml
Class DOMWriter

    java.lang.Object
      org.jboss.util.xml.DOMWriter

public class DOMWriter
extends Object

A sample DOM writer. This sample program illustrates how to traverse a DOM tree in order to print a document that is parsed.

Version:
  $Revision: 1.4 $

Field Summary
`protected boolean` | `canonical` Canonical output.
`protected PrintWriter` | `out` Print writer.

Constructor Summary
`DOMWriter(Writer w)`
`DOMWriter(Writer w, boolean canonical)`

Method Summary
`protected String` | `normalize(String s)` Normalizes the given string.
`void` | `print(Node node)`
`void` | `print(Node node, boolean prettyprint)`
`protected Attr[]` | `sortAttributes(NamedNodeMap attrs)` Returns a sorted list of attributes.

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

Field Detail

### out

    protected PrintWriter out

  Print writer.

### canonical

    protected boolean canonical

  Canonical output.

Constructor Detail

### DOMWriter

    public DOMWriter(Writer w)

### DOMWriter

    public DOMWriter(Writer w,
                     boolean canonical)

Method Detail

### print

    public void print(Node node)

### print

    public void print(Node node,
                      boolean prettyprint)

### sortAttributes

    protected Attr[] sortAttributes(NamedNodeMap attrs)

  Returns a sorted list of attributes.

### normalize

    protected String normalize(String s)

  Normalizes the given string.

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

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.