public interface Parser
Parser interface abstracts the behavior which the
org.eigenbase.xom package needs from an XML parser.
If you don't care which implementation you get, call XOMUtil.createDefaultParser() to create a parser.
| Modifier and Type | Method and Description |
|---|---|
DOMWrapper |
create(String tagName)
Creates a wrapper representing an XML element.
|
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 sXml)
Parses a string and returns a wrapped element.
|
DOMWrapper |
parse(URL url)
Parses the contents of a URL and returns a wrapped element.
|
void |
setKeepPositions(boolean keepPositions)
Sets whether to retain position information.
|
void setKeepPositions(boolean keepPositions)
keepPositions - Whether to keep position information.boolean isKeepPositions()
DOMWrapper parse(String sXml) throws XOMException
sXml - XML stringXOMException - on errorDOMWrapper parse(InputStream is) throws XOMException
is - Input streamXOMException - on errorDOMWrapper parse(URL url) throws XOMException
url - URLXOMException - on errorDOMWrapper parse(Reader reader) throws XOMException
reader - ReaderXOMException - on errorDOMWrapper create(String tagName)
tagName - Name of elementCopyright © 2012–2022 Julian Hyde. All rights reserved.