public class XMLParser
extends java.lang.Object
Element tree.| Modifier and Type | Field and Description |
|---|---|
protected org.xml.sax.XMLReader |
parser
the parser implementation
|
| Constructor and Description |
|---|
XMLParser()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Element |
parse(org.xml.sax.InputSource is)
Parses an XML string returning an element tree from it.
|
Element |
parse(java.lang.String str)
Parses an XML String, returning a Element tree representing the XML
structure.
|
Element |
readFile(java.lang.String filename)
Read in an XML file and parse it and return an element tree.
|
protected void |
trace(java.lang.String s)
trace
|
public XMLParser()
throws JNCException
JNCExceptionpublic Element readFile(java.lang.String filename) throws JNCException
JNCExceptionpublic Element parse(org.xml.sax.InputSource is) throws JNCException
is - Inputsource (byte stream) where the XML text is read fromJNCExceptionpublic Element parse(java.lang.String str) throws JNCException
str - String containing the XML text to parseJNCExceptionprotected void trace(java.lang.String s)