Package org.eigenbase.xom.wrappers
Class XercesDOMParser
- java.lang.Object
-
- org.eigenbase.xom.wrappers.GenericDOMParser
-
- org.eigenbase.xom.wrappers.XercesDOMParser
-
public class XercesDOMParser extends GenericDOMParser
This private helper class presents a GenericDOMParser using Xerces, with simple error handling appropriate for a testing environment.
-
-
Field Summary
-
Fields inherited from class org.eigenbase.xom.wrappers.GenericDOMParser
document, errorBuffer, errorOut, LOAD_EXTERNAL_DTD_FEATURE, VALIDATION_FEATURE
-
-
Constructor Summary
Constructors Constructor Description XercesDOMParser()Constructs a non-validating Xerces DOM Parser.XercesDOMParser(boolean validate)Constructs a Xerces DOM Parser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DOMWrappercreate(java.lang.String tagName)Creates a wrapper representing an XML element.protected org.w3c.dom.DocumentparseInputSource(org.xml.sax.InputSource in)Parses the specified URI and returns the document.-
Methods inherited from class org.eigenbase.xom.wrappers.GenericDOMParser
error, fatalError, getLocation, handleErrors, isKeepPositions, parse, parse, parse, parse, prepareParse, setKeepPositions, warning
-
-
-
-
Constructor Detail
-
XercesDOMParser
public XercesDOMParser() throws XOMExceptionConstructs a non-validating Xerces DOM Parser.- Throws:
XOMException
-
XercesDOMParser
public XercesDOMParser(boolean validate) throws XOMExceptionConstructs a Xerces DOM Parser.- Parameters:
validate- whether to enable validation- Throws:
XOMException
-
-
Method Detail
-
parseInputSource
protected org.w3c.dom.Document parseInputSource(org.xml.sax.InputSource in) throws XOMExceptionDescription copied from class:GenericDOMParserParses the specified URI and returns the document.- Specified by:
parseInputSourcein classGenericDOMParser- Parameters:
in- Input source- Returns:
- Document
- Throws:
XOMException- on error
-
create
public DOMWrapper create(java.lang.String tagName)
Description copied from interface:ParserCreates a wrapper representing an XML element.- Specified by:
createin interfaceParser- Overrides:
createin classGenericDOMParser- Parameters:
tagName- Name of element- Returns:
- Wrapper element
-
-