站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 common API Documentation 英文版文档

DOMWriter (JBoss/Common API) - JBoss 4.0.1 sp1 common API Documentation 英文版文档


org.jboss.util.xml
Class DOMWriter

java.lang.Object
  extended byorg.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.



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