uk.co.lakesidetech.springxmldb.util
Class XMLUtils

java.lang.Object
  extended byuk.co.lakesidetech.springxmldb.util.XMLUtils

public class XMLUtils
extends java.lang.Object

Utilities class for dealing with XML documents

Author:
Stuart Eccles

Field Summary
static java.lang.String DEFAULT_OUTPUT_ENCODING
           
 
Constructor Summary
XMLUtils()
           
 
Method Summary
static java.lang.String domDocumentToString(org.w3c.dom.Document doc)
           
static java.lang.String jdomDocumentToString(org.jdom.Document doc)
           
 org.w3c.dom.Document parse(byte[] xml)
           
 org.w3c.dom.Document parse(org.xml.sax.InputSource source)
           
 org.w3c.dom.Document parse(java.io.InputStream input)
           
 org.w3c.dom.Document parse(java.io.Reader input)
           
 org.w3c.dom.Document parse(java.lang.String xml)
           
static org.w3c.dom.Document toDocument(byte[] xml)
           
static org.w3c.dom.Document toDocument(org.xml.sax.InputSource source)
           
static org.w3c.dom.Document toDocument(java.io.InputStream input)
           
static org.w3c.dom.Document toDocument(java.io.Reader input)
           
static org.w3c.dom.Document toDocument(java.lang.String xml)
           
static org.w3c.dom.Document xmlStringToDOMDocument(java.lang.String xml)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_OUTPUT_ENCODING

public static final java.lang.String DEFAULT_OUTPUT_ENCODING
See Also:
Constant Field Values
Constructor Detail

XMLUtils

public XMLUtils()
         throws XMLParsingException
Method Detail

parse

public org.w3c.dom.Document parse(java.lang.String xml)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
Throws:
org.xml.sax.SAXException
java.io.IOException

parse

public org.w3c.dom.Document parse(java.io.Reader input)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
Throws:
org.xml.sax.SAXException
java.io.IOException

parse

public org.w3c.dom.Document parse(byte[] xml)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
Throws:
org.xml.sax.SAXException
java.io.IOException

parse

public org.w3c.dom.Document parse(org.xml.sax.InputSource source)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
Throws:
org.xml.sax.SAXException
java.io.IOException

parse

public org.w3c.dom.Document parse(java.io.InputStream input)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
Throws:
org.xml.sax.SAXException
java.io.IOException

toDocument

public static org.w3c.dom.Document toDocument(java.io.Reader input)
                                       throws XMLParsingException
Throws:
XMLParsingException

toDocument

public static org.w3c.dom.Document toDocument(byte[] xml)
                                       throws XMLParsingException
Throws:
XMLParsingException

toDocument

public static org.w3c.dom.Document toDocument(org.xml.sax.InputSource source)
                                       throws XMLParsingException
Throws:
XMLParsingException

toDocument

public static org.w3c.dom.Document toDocument(java.io.InputStream input)
                                       throws XMLParsingException
Throws:
XMLParsingException

toDocument

public static org.w3c.dom.Document toDocument(java.lang.String xml)
                                       throws XMLParsingException
Throws:
XMLParsingException

jdomDocumentToString

public static java.lang.String jdomDocumentToString(org.jdom.Document doc)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

domDocumentToString

public static java.lang.String domDocumentToString(org.w3c.dom.Document doc)
                                            throws java.lang.Exception
Throws:
java.lang.Exception

xmlStringToDOMDocument

public static org.w3c.dom.Document xmlStringToDOMDocument(java.lang.String xml)
                                                   throws XMLParsingException
Returns:
Throws:
java.lang.Exception
XMLParsingException