JBoss API: Class DOMWriter

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

## org.jboss.util
Class DOMWriter

    java.lang.Object
      |
      +--org.jboss.util.DOMWriter

public class DOMWriter
extends java.lang.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:
  $Id: DOMWriter.java,v 1.1 2001/03/07 09:46:53 kimptonc Exp $

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

Constructor Summary
`DOMWriter(java.io.Writer w, boolean canonical)`

Method Summary
`static java.lang.String` | `getWriterEncoding()`
`protected java.lang.String` | `normalize(java.lang.String s)` Normalizes the given string.
`void` | `print(org.w3c.dom.Node node)`
`void` | `print(org.w3c.dom.Node node, boolean prettyprint)` Prints the specified node, recursively.
`protected org.w3c.dom.Attr[]` | `sortAttributes(org.w3c.dom.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 java.io.PrintWriter out

  Print writer.

### canonical

    protected boolean canonical

  Canonical output.

Constructor Detail

### DOMWriter

    public DOMWriter(java.io.Writer w,
                     boolean canonical)
              throws java.io.UnsupportedEncodingException

Method Detail

### getWriterEncoding

    public static java.lang.String getWriterEncoding()

### print

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

### print

    public void print(org.w3c.dom.Node node,
                      boolean prettyprint)

  Prints the specified node, recursively.

### sortAttributes

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

  Returns a sorted list of attributes.

### normalize

    protected java.lang.String normalize(java.lang.String s)

  Normalizes the given string.

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

Copyright © 2000 The JBoss Organization. All Rights Reserved.