org.eigenbase.xom.wrappers
Class XercesDOMParser
java.lang.Object
org.eigenbase.xom.wrappers.GenericDOMParser
org.eigenbase.xom.wrappers.XercesDOMParser
- All Implemented Interfaces:
- Locator, Parser, ErrorHandler
public class XercesDOMParser
- extends GenericDOMParser
This private helper class presents a GenericDOMParser using Xerces, with
simple error handling appropriate for a testing environment.
-
-
Constructor Summary |
XercesDOMParser()
Constructs a non-validating Xerces DOM Parser. |
XercesDOMParser(boolean validate)
Constructs a Xerces DOM Parser. |
Methods inherited from class org.eigenbase.xom.wrappers.GenericDOMParser |
error, fatalError, getLocation, handleErrors, isKeepPositions, parse, parse, parse, parse, prepareParse, setKeepPositions, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XercesDOMParser
public XercesDOMParser()
throws XOMException
- Constructs a non-validating Xerces DOM Parser.
- Throws:
XOMException
XercesDOMParser
public XercesDOMParser(boolean validate)
throws XOMException
- Constructs a Xerces DOM Parser.
- Throws:
XOMException
- Parameters:
validate
- whether to enable validation
parseInputSource
protected Document parseInputSource(InputSource in)
throws XOMException
- Description copied from class:
GenericDOMParser
- Parses the specified URI and returns the document.
- Specified by:
parseInputSource
in class GenericDOMParser
- Throws:
XOMException
- on error- Parameters:
in
- Input source
- Returns:
- Document
create
public DOMWrapper create(String tagName)
- Description copied from interface:
Parser
- Creates a wrapper representing an XML element.
- Specified by:
create
in interface Parser
- Overrides:
create
in class GenericDOMParser
- Parameters:
tagName
- Name of element
- Returns:
- Wrapper element