|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.novell.xml.parser.SAXParserImpl
Implementation class that implements com.novell.xml.parser.XMLParser using a SAX Parser.
The actual parser to use is determined from the system property
"com.novell.xml.parser". If this property is not set, the system property
"org.xml.sax.parser" is used. If this property is also not set, the
parser used defaults to com.jclark.xml.sax.CommentDriver.
XMLParser| Constructor Summary | |
SAXParserImpl()
Construct an object that implements XMLParser using a SAX Parser. |
|
| Method Summary | |
boolean |
anyErrors()
return if any errors occurred while parsing |
Vector |
getErrorMsgs()
Return any error messages generated during parsing |
String |
getErrorMsgString()
Return any error messages generated during parsing as a single string, with each message separated by a newline. |
Document |
parse(File file)
parse the passed file as an XML document |
Document |
parse(InputSource inputSource)
parse the passed SAX InputSource as an XML document |
Document |
parse(InputStream input)
parser the input stream as an XML document |
Document |
parse(Reader input)
parser the input stream as an XML document |
Document |
parse(String uri)
parse the passed uri as an XML document |
void |
reportErrorMsgs(OutputStream out)
Output any error messages from last parse operation |
void |
setContextURI(String uri)
Set the context URI for parsing. |
void |
setConverter(SAXtoDOM converter)
Set the converter object to use for converting the SAX events to a DOM tree. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SAXParserImpl()
| Method Detail |
public Document parse(InputStream input)
parse in interface XMLParserinput - input stream to be treated as XML document
public Document parse(Reader input)
parse in interface XMLParserinput - reader to be treated as XML document
public Document parse(String uri)
throws FileNotFoundException,
IOException,
MalformedURLException
parse in interface XMLParseruri - The uri string
FileNotFoundException
IOException
MalformedURLException
public Document parse(InputSource inputSource)
throws FileNotFoundException,
IOException
InputSource as an XML document
parse in interface XMLParserinputSource - The input source from which to get the
input stream.
FileNotFoundException
IOException
public Document parse(File file)
throws FileNotFoundException
parse in interface XMLParserfile - file
FileNotFoundExceptionpublic void setConverter(SAXtoDOM converter)
com.novell.xml.sax.SAXtoDOM
object is used.
converter - A SAXtoDOM-derived object (may be null, in which
case the behavior reverts to standard)
public void setContextURI(String uri)
throws MalformedURLException
parse(java.io.InputStream input) and
parse(java.io.Reader input).
setContextURI in interface XMLParseruri - the URI
MalformedURLException - If the passed URI is
malformed or can't be made into a URL.public boolean anyErrors()
anyErrors in interface XMLParserpublic Vector getErrorMsgs()
getErrorMsgs in interface XMLParserpublic String getErrorMsgString()
getErrorMsgString in interface XMLParserpublic void reportErrorMsgs(OutputStream out)
reportErrorMsgs in interface XMLParserout - OutputStream object to write to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||