org.ceryle.xml
Class XTidy

java.lang.Object
  extended by org.ceryle.xml.XTidy

public class XTidy
extends Object

A wrapper for JTidy, to be used in cleaning up XML content.

Since:
JDK1.3
Version:
$Id: XTidy.java,v 3.4 2007-06-15 12:10:30 altheim Exp $
Author:
Murray Altheim
See Also:
Tidy

Constructor Summary
XTidy()
          Default constructor for XTidy.
 
Method Summary
 void initErrorWriter()
          Creates a PrintWriter to capture errors and warnings from JTidy.
 Document tidyDocument(InputStream docSource)
          Provided with an InputStream representing a Document, cleans and returns a DOM Document object, sending errors to the MessageHandler er.
 org.w3c.tidy.Node tidyNode(InputStream nodeSource)
          Provided with an InputStream representing a Node, cleans and returns a DOM Node object, sending errors to the MessageHandler er.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XTidy

public XTidy()
Default constructor for XTidy.

Method Detail

initErrorWriter

public void initErrorWriter()
Creates a PrintWriter to capture errors and warnings from JTidy. This method should be called to reset the error handler before reusing an XTidy instance.


tidyNode

public org.w3c.tidy.Node tidyNode(InputStream nodeSource)
Provided with an InputStream representing a Node, cleans and returns a DOM Node object, sending errors to the MessageHandler er.

Parameters:
nodeSource - the incoming Node to be cleaned.
Returns:
a cleaned up Node.

tidyDocument

public Document tidyDocument(InputStream docSource)
Provided with an InputStream representing a Document, cleans and returns a DOM Document object, sending errors to the MessageHandler er.

Parameters:
docSource - an InputStream containing the incoming Document to be cleaned.
Returns:
a cleaned up Document.


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.