org.objectweb.easybeans.util.xml
Class DocumentParser

java.lang.Object
  extended by org.objectweb.easybeans.util.xml.DocumentParser

public final class DocumentParser
extends java.lang.Object

Allows to parse an xml file.

Author:
Florent Benoit

Constructor Summary
private DocumentParser()
          Utility class.
 
Method Summary
static org.w3c.dom.Document getDocument(java.net.URL url, boolean isValidating, org.xml.sax.EntityResolver entityResolver)
          Builds a new Document for a given xml file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentParser

private DocumentParser()
Utility class.

Method Detail

getDocument

public static org.w3c.dom.Document getDocument(java.net.URL url,
                                               boolean isValidating,
                                               org.xml.sax.EntityResolver entityResolver)
                                        throws DocumentParserException
Builds a new Document for a given xml file.

Parameters:
url - the URL of the the XML file.
isValidating - validate or not the xml file ?
entityResolver - the entityResolver used to validate document (if validating = true)
Returns:
an application object.
Throws:
DocumentParserException - if creating of builder fails or parsing fails.