|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.xom.wrappers.GenericDOMParser
abstract class GenericDOMParser
A GenericDOMParser is an abstract base class for XercesDOMParser and JaxpDOMParser.
| Field Summary | |
|---|---|
protected org.w3c.dom.Document |
document
The document which spawns elements. |
(package private) java.io.StringWriter |
errorBuffer
|
(package private) java.io.PrintWriter |
errorOut
|
(package private) static java.lang.String |
LOAD_EXTERNAL_DTD_FEATURE
|
(package private) static java.lang.String |
VALIDATION_FEATURE
|
| Constructor Summary | |
|---|---|
GenericDOMParser()
|
|
| Method Summary | |
|---|---|
DOMWrapper |
create(java.lang.String tagName)
Creates a wrapper representing an XML element. |
void |
error(org.xml.sax.SAXParseException ex)
Error. |
void |
fatalError(org.xml.sax.SAXParseException ex)
Fatal error. |
Location |
getLocation(DOMWrapper wrapper)
|
protected void |
handleErrors()
|
boolean |
isKeepPositions()
Returns whether the parser is retaining position information. |
DOMWrapper |
parse(java.io.InputStream is)
Parses an input stream and returns a wrapped element. |
DOMWrapper |
parse(java.io.Reader reader)
Parses the contents of a reader and returns a wrapped element. |
DOMWrapper |
parse(java.lang.String xmlString)
Parses a string and returns a wrapped element. |
DOMWrapper |
parse(java.net.URL url)
Parses the contents of a URL and returns a wrapped element. |
protected abstract org.w3c.dom.Document |
parseInputSource(org.xml.sax.InputSource in)
Parses the specified URI and returns the document. |
protected void |
prepareParse()
|
void |
setKeepPositions(boolean keepPositions)
Sets whether to retain position information. |
void |
warning(org.xml.sax.SAXParseException ex)
Warning. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
java.io.StringWriter errorBuffer
java.io.PrintWriter errorOut
protected org.w3c.dom.Document document
static final java.lang.String LOAD_EXTERNAL_DTD_FEATURE
static final java.lang.String VALIDATION_FEATURE
| Constructor Detail |
|---|
GenericDOMParser()
| Method Detail |
|---|
public DOMWrapper create(java.lang.String tagName)
Parser
create in interface ParsertagName - Name of element
public DOMWrapper parse(java.io.InputStream is)
throws XOMException
Parser
parse in interface Parseris - Input stream
XOMException - on errorpublic void setKeepPositions(boolean keepPositions)
Parser
setKeepPositions in interface ParserkeepPositions - Whether to keep position information.public boolean isKeepPositions()
Parser
isKeepPositions in interface Parser
public DOMWrapper parse(java.lang.String xmlString)
throws XOMException
Parser
parse in interface ParserxmlString - XML string
XOMException - on error
public DOMWrapper parse(java.io.Reader reader)
throws XOMException
Parser
parse in interface Parserreader - Reader
XOMException - on error
protected abstract org.w3c.dom.Document parseInputSource(org.xml.sax.InputSource in)
throws XOMException
in - Input source
XOMException - on errorpublic void warning(org.xml.sax.SAXParseException ex)
warning in interface org.xml.sax.ErrorHandlerpublic void error(org.xml.sax.SAXParseException ex)
error in interface org.xml.sax.ErrorHandler
public void fatalError(org.xml.sax.SAXParseException ex)
throws org.xml.sax.SAXException
fatalError in interface org.xml.sax.ErrorHandlerorg.xml.sax.SAXException
public DOMWrapper parse(java.net.URL url)
throws XOMException
Parser
parse in interface Parserurl - URL
XOMException - on errorprotected void prepareParse()
protected void handleErrors()
throws XOMException
XOMExceptionpublic Location getLocation(DOMWrapper wrapper)
getLocation in interface Locator
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||