oracle.toplink.tools.ejbjar
Class XMLParser
java.lang.Object
oracle.toplink.tools.ejbjar.XMLParser
- public class XMLParser
- extends java.lang.Object
This class is designed to handle the simple parsing of an XML file. An example of how to call this is:
doc = XMLParser.parseXML("ejb-jar.xml");
Method Summary |
static void |
allowNonEjb_2_0_DocType()
|
static void |
doNotAllowNonEjb_2_0_DocType()
|
static void |
main(java.lang.String[] args)
|
static org.w3c.dom.Document |
parseXML(org.xml.sax.InputSource inputSource)
Opens and parses an xml document and returns the root element, or throws an error. |
static org.w3c.dom.Document |
parseXML(java.lang.String filename)
Opens and parses an xml document and returns the root element, or throws an error. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLParser
public XMLParser()
allowNonEjb_2_0_DocType
public static void allowNonEjb_2_0_DocType()
doNotAllowNonEjb_2_0_DocType
public static void doNotAllowNonEjb_2_0_DocType()
parseXML
public static org.w3c.dom.Document parseXML(java.lang.String filename)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException,
EJBJarXMLException
- Opens and parses an xml document and returns the root element, or throws an error.
-
- Parameters:
filename
- the XML file to open
- Returns:
- Document the document object containing the XML data
- Throws:
IOException,
- SAXParseException, SAXException, ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
EJBJarXMLException
parseXML
public static org.w3c.dom.Document parseXML(org.xml.sax.InputSource inputSource)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException,
EJBJarXMLException
- Opens and parses an xml document and returns the root element, or throws an error.
-
- Parameters:
inputSource
- the Sax inputsource
- Returns:
- Document the document object containing the XML data
- Throws:
IOException,
- SAXParseException, SAXException, ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
EJBJarXMLException
main
public static void main(java.lang.String[] args)