public class XMLParser
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
XMLParser.EntityResolver
The entity resolver that tries to first load a DTD file locally, and if
it is not found, looks for it on the Internet using the DTD file's
system ID.
|
Constructor and Description |
---|
XMLParser() |
Modifier and Type | Method and Description |
---|---|
org.w3c.dom.Document |
parser(java.io.InputStream is)
Generate the document tree for the specified input stream.
|
org.w3c.dom.Document |
parser(java.lang.String str)
Generate the document tree for the specified XML string.
|
public XMLParser() throws java.lang.Exception
java.lang.Exception
public org.w3c.dom.Document parser(java.lang.String str) throws java.lang.Exception
str
- The XML string to be parsed.java.lang.Exception
- If the parse fails.public org.w3c.dom.Document parser(java.io.InputStream is) throws java.lang.Exception
is
- The input steam to be parsed.java.lang.Exception
- If the parse fails.