|
|||||||||
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 Document |
document
The document which spawns elements. |
(package private) StringWriter |
errorBuffer
|
(package private) PrintWriter |
errorOut
|
(package private) static String |
LOAD_EXTERNAL_DTD_FEATURE
|
(package private) static String |
VALIDATION_FEATURE
|
Constructor Summary | |
---|---|
GenericDOMParser()
|
Method Summary | |
---|---|
DOMWrapper |
create(String tagName)
Creates a wrapper representing an XML element. |
void |
error(SAXParseException ex)
Error. |
void |
fatalError(SAXParseException ex)
Fatal error. |
Location |
getLocation(DOMWrapper wrapper)
|
protected void |
handleErrors()
|
boolean |
isKeepPositions()
Returns whether the parser is retaining position information. |
DOMWrapper |
parse(InputStream is)
Parses an input stream and returns a wrapped element. |
DOMWrapper |
parse(Reader reader)
Parses the contents of a reader and returns a wrapped element. |
DOMWrapper |
parse(String xmlString)
Parses a string and returns a wrapped element. |
DOMWrapper |
parse(URL url)
Parses the contents of a URL and returns a wrapped element. |
protected abstract Document |
parseInputSource(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(SAXParseException ex)
Warning. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
StringWriter errorBuffer
PrintWriter errorOut
protected Document document
static final String LOAD_EXTERNAL_DTD_FEATURE
static final String VALIDATION_FEATURE
Constructor Detail |
---|
GenericDOMParser()
Method Detail |
---|
public DOMWrapper create(String tagName)
Parser
create
in interface Parser
tagName
- Name of element
public DOMWrapper parse(InputStream is) throws XOMException
Parser
parse
in interface Parser
is
- Input stream
XOMException
- on errorpublic void setKeepPositions(boolean keepPositions)
Parser
setKeepPositions
in interface Parser
keepPositions
- Whether to keep position information.public boolean isKeepPositions()
Parser
isKeepPositions
in interface Parser
public DOMWrapper parse(String xmlString) throws XOMException
Parser
parse
in interface Parser
xmlString
- XML string
XOMException
- on errorpublic DOMWrapper parse(Reader reader) throws XOMException
Parser
parse
in interface Parser
reader
- Reader
XOMException
- on errorprotected abstract Document parseInputSource(InputSource in) throws XOMException
in
- Input source
XOMException
- on errorpublic void warning(SAXParseException ex)
warning
in interface ErrorHandler
public void error(SAXParseException ex)
error
in interface ErrorHandler
public void fatalError(SAXParseException ex) throws SAXException
fatalError
in interface ErrorHandler
SAXException
public DOMWrapper parse(URL url) throws XOMException
Parser
parse
in interface Parser
url
- URL
XOMException
- on errorprotected void prepareParse()
protected void handleErrors() throws XOMException
XOMException
public Location getLocation(DOMWrapper wrapper)
getLocation
in interface Locator
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |