maiolum.xml
Class XMLDocumentParser

java.lang.Object
  extended bymaiolum.xml.XMLDocumentParser

public class XMLDocumentParser
extends java.lang.Object

XMLDocumentParser provides methods to get org.w3c.dom.Document instances with data read from files.


Constructor Summary
XMLDocumentParser()
           
 
Method Summary
static org.w3c.dom.Document parse(java.io.File f)
          Parses DOM Document from the filename given by File object.
static org.w3c.dom.Document parse(java.lang.String URI)
          Parses DOM Document from the filename given by the string argument.
static org.w3c.dom.Document parseString(java.lang.String xmlData)
          Parses given String as XML data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLDocumentParser

public XMLDocumentParser()
Method Detail

parse

public static org.w3c.dom.Document parse(java.lang.String URI)
                                  throws javax.xml.parsers.ParserConfigurationException,
                                         org.xml.sax.SAXException,
                                         java.io.IOException
Parses DOM Document from the filename given by the string argument.

Returns:
Document parsed from given XML file
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException

parse

public static org.w3c.dom.Document parse(java.io.File f)
                                  throws javax.xml.parsers.ParserConfigurationException,
                                         org.xml.sax.SAXException,
                                         java.io.IOException
Parses DOM Document from the filename given by File object.

Returns:
Document parsed from given XML file
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException

parseString

public static org.w3c.dom.Document parseString(java.lang.String xmlData)
                                        throws ParseException
Parses given String as XML data.

Parameters:
xmlData - String containing XML data
Returns:
Document
Throws:
ParseException