|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.cke.importexport.xml.XercesParserWrapper
Wraps the Xerces 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.
Constructor Summary | |
XercesParserWrapper()
The constructor that initializes the parser and sets the basic features. |
Method Summary | |
void |
error(org.xml.sax.SAXParseException ex)
In case the parser encounters an error while parsing the document, then the error should be logged. |
void |
fatalError(org.xml.sax.SAXParseException ex)
In case the parser encounters a fatal error while parsing the document, then the fatal error should be logged. |
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. |
protected java.lang.String |
getLocationString(org.xml.sax.SAXParseException ex)
Finds the location of an error in the DOM document and returns this location as a string. |
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. |
void |
warning(org.xml.sax.SAXParseException ex)
In case the parser encounters a warning while parsing the document, then the warning should be logged. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XercesParserWrapper()
Method Detail |
public org.w3c.dom.Document parse(java.lang.String url) throws java.lang.Exception
DOMparserWrapper
parse
in interface DOMparserWrapper
url
- the URL of the document to parse
java.lang.Exception
- an expection if an parser error occursDOMparserWrapper.parse(String)
public org.w3c.dom.Document parse(java.io.InputStream istream) throws java.lang.Exception
DOMparserWrapper
parse
in interface DOMparserWrapper
istream
- the input stream being the source of the document to parse
java.lang.Exception
- an expection if an parser error occursDOMparserWrapper.parse(InputStream)
public org.w3c.dom.Document parse(java.io.Reader reader) throws java.lang.Exception
DOMparserWrapper
parse
in interface DOMparserWrapper
reader
- the input reader being the source of the document to parse
java.lang.Exception
- an expection if an parser error occursDOMparserWrapper.parse(Reader)
public org.w3c.dom.Document parse(org.w3c.dom.Document document) throws java.lang.Exception
DOMparserWrapper
parse
in interface DOMparserWrapper
document
- the DOM object to parse
java.lang.Exception
- an expection if an parser error occursDOMparserWrapper.parse(Document)
public void setFeature(java.lang.String featureId, boolean state) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
DOMparserWrapper
setFeature
in interface DOMparserWrapper
featureId
- The unique identifier (URI) of the feature.state
- The requested state of the feature (true or false).
org.xml.sax.SAXNotSupportedException
- If the
requested feature is known, but the requested
state is not supported.
org.xml.sax.SAXNotRecognizedException
- If the
requested feature is not known.DOMparserWrapper.setFeature(String, boolean)
public java.lang.String getErrorsMsg()
DOMparserWrapper
getErrorsMsg
in interface DOMparserWrapper
DOMparserWrapper.getErrorsMsg()
public java.lang.String getWarningsMsg()
DOMparserWrapper
getWarningsMsg
in interface DOMparserWrapper
DOMparserWrapper.getWarningsMsg()
public java.lang.String getFatalErrorsMsg()
DOMparserWrapper
getFatalErrorsMsg
in interface DOMparserWrapper
DOMparserWrapper.getFatalErrorsMsg()
public int getNumberOfErrors()
DOMparserWrapper
getNumberOfErrors
in interface DOMparserWrapper
DOMparserWrapper.getNumberOfErrors()
public int getNumberOfWarnings()
DOMparserWrapper
getNumberOfWarnings
in interface DOMparserWrapper
DOMparserWrapper.getNumberOfWarnings()
public int getNumberOfFatalErrors()
DOMparserWrapper
getNumberOfFatalErrors
in interface DOMparserWrapper
DOMparserWrapper.getNumberOfFatalErrors()
public void warning(org.xml.sax.SAXParseException ex)
warning
in interface org.xml.sax.ErrorHandler
ex
- the exception that occuredErrorHandler.warning(SAXParseException)
public void error(org.xml.sax.SAXParseException ex)
error
in interface org.xml.sax.ErrorHandler
ex
- the exception that occuredErrorHandler.error(SAXParseException)
public void fatalError(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
ex
- the exception that occured
org.xml.sax.SAXException
ErrorHandler.fatalError(SAXParseException)
protected java.lang.String getLocationString(org.xml.sax.SAXParseException ex)
ex
- the exception that occured
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |