net.sourceforge.geeboss.util
Class XmlUtil

java.lang.Object
  extended by net.sourceforge.geeboss.util.XmlUtil

public class XmlUtil
extends java.lang.Object

Utility methods for XML documents

Author:
Frederic BORRY

Constructor Summary
XmlUtil()
           
 
Method Summary
static org.w3c.dom.Document readDocument(java.io.File file)
          Read an XML Document from a file
static org.w3c.dom.Document readDocument(java.io.InputStream inputStream)
          Read an XML Document from an input stream
static void writeDocument(org.w3c.dom.Document document, java.io.File file)
          Write an XML Document into a file
static void writeDocument(org.w3c.dom.Document document, java.io.OutputStream outputStream)
          Write an XML Document into an output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlUtil

public XmlUtil()
Method Detail

writeDocument

public static void writeDocument(org.w3c.dom.Document document,
                                 java.io.OutputStream outputStream)
                          throws java.io.IOException
Write an XML Document into an output stream

Parameters:
document - the document to write
outputStream - the output stream to write the document to
Throws:
java.io.IOException

writeDocument

public static void writeDocument(org.w3c.dom.Document document,
                                 java.io.File file)
                          throws java.io.IOException
Write an XML Document into a file

Parameters:
document - the document to write
file - the file write the document to
Throws:
java.io.IOException

readDocument

public static org.w3c.dom.Document readDocument(java.io.InputStream inputStream)
                                         throws org.xml.sax.SAXException,
                                                java.io.IOException
Read an XML Document from an input stream

Parameters:
inputStream - the input stream to read
Returns:
the read document
Throws:
java.io.IOException
org.xml.sax.SAXException

readDocument

public static org.w3c.dom.Document readDocument(java.io.File file)
                                         throws org.xml.sax.SAXException,
                                                java.io.IOException
Read an XML Document from a file

Parameters:
file - the file to read
Returns:
the read document
Throws:
org.xml.sax.SAXException
java.io.IOException


Copyright (c) 2005 The Geeboss team (http://geeboss.sourceforge.net). All Rights Reserved.