|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Encapsulates a DOM parser.
This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally based on software copyright (c) 1999, International Business Machines, Inc., http://www.apache.org. For more information on the Apache Software Foundation, please see www.apache.org.
Method Summary | |
java.lang.String |
getErrorsMsg()
Returns a string with all the error messages the parser reports when parsing. |
java.lang.String |
getFatalErrorsMsg()
Returns a string with all the fatal error messages the parser reports when parsing. |
int |
getNumberOfErrors()
Returns the number of error messages the parser reports when parsing |
int |
getNumberOfFatalErrors()
Returns the number of fatal error messages the parser reports when parsing |
int |
getNumberOfWarnings()
Returns the number of warning messages the parser reports when parsing |
java.lang.String |
getWarningsMsg()
Returns a string with all the warning messages the parser reports when parsing. |
org.w3c.dom.Document |
parse(org.w3c.dom.Document document)
Parses the specified Document and returns it as a DOM document. |
org.w3c.dom.Document |
parse(java.io.InputStream istream)
Parses the specified InputStream and returns the document. |
org.w3c.dom.Document |
parse(java.io.Reader reader)
Parses the specified Reader and returns it as a DOM document. |
org.w3c.dom.Document |
parse(java.lang.String url)
Parses the specified URL and returns it as a DOM document. |
void |
setFeature(java.lang.String featureId,
boolean state)
Set the state of a feature. |
Method Detail |
public org.w3c.dom.Document parse(java.lang.String url) throws java.lang.Exception
url
- the URL of the document to parse
java.lang.Exception
- an expection if an parser error occurspublic org.w3c.dom.Document parse(java.io.InputStream istream) throws java.lang.Exception
istream
- the input stream being the source of the document to parse
java.lang.Exception
- an expection if an parser error occurspublic org.w3c.dom.Document parse(java.io.Reader reader) throws java.lang.Exception
reader
- the input reader being the source of the document to parse
java.lang.Exception
- an expection if an parser error occurspublic org.w3c.dom.Document parse(org.w3c.dom.Document document) throws java.lang.Exception
document
- the DOM object to parse
java.lang.Exception
- an expection if an parser error occurspublic void setFeature(java.lang.String featureId, boolean state) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
featureId
- The unique identifier (URI) of the feature.state
- The requested state of the feature (true or false).
org.xml.sax.SAXNotRecognizedException
- If the
requested feature is not known.
org.xml.sax.SAXNotSupportedException
- If the
requested feature is known, but the requested
state is not supported.
org.xml.sax.SAXException
- If there is any other
problem fulfilling the request.public java.lang.String getErrorsMsg()
public java.lang.String getWarningsMsg()
public java.lang.String getFatalErrorsMsg()
public int getNumberOfErrors()
public int getNumberOfWarnings()
public int getNumberOfFatalErrors()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |