org.mentawai.ajax
Class DOMUtils
java.lang.Object
org.mentawai.ajax.DOMUtils
public final class DOMUtils
- extends Object
- Author:
- Rubem Azenha (rubem.azenha@gmail.com)
A utility class for manipulating DOM documents. This class provide services and is implemented to
prevent code repetition.
|
Method Summary |
static String |
getDocumentAsString(org.jdom.Document document,
boolean pretty)
Get a String representation of a DOM document. |
static void |
writeDocument(org.jdom.Document document,
OutputStream outputStream,
boolean pretty)
Write an given document to a output stream. |
static void |
writeDocument(org.jdom.Document document,
Writer writer,
boolean pretty)
Write an given document to a writer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DOMUtils
public DOMUtils()
getDocumentAsString
public static final String getDocumentAsString(org.jdom.Document document,
boolean pretty)
- Get a String representation of a DOM document.
- Parameters:
document - The document to represent
- Returns:
- The String representation of the document
writeDocument
public static final void writeDocument(org.jdom.Document document,
OutputStream outputStream,
boolean pretty)
throws IOException
- Write an given document to a output stream.
- Parameters:
document - The document to be writed out.outputStream - The output stream that will be used to write the document.
- Throws:
IOException - If an I\O error ocours while using the output stream.
writeDocument
public static final void writeDocument(org.jdom.Document document,
Writer writer,
boolean pretty)
throws IOException
- Write an given document to a writer.
- Parameters:
document - The document to be writed out.writer - The writer that will be used to write the document.
- Throws:
IOException - If an I\O error ocours while using the writer.
Copyright © 2012. All Rights Reserved.