| Modifier and Type | Method and Description |
|---|---|
<T> T |
parse(XmlParser<T> parser)
Parse this XML document with the given parser.
|
<T> Optional<T> |
parseOnce(XmlParser<? extends T> parser)
Parse this XML document with the given parser if it has not already been parsed.
|
String |
path()
The path at which this document is located.
|
public <T> T parse(XmlParser<T> parser) throws ParserConfigurationException, SAXException, IOException
T - the type of the element produced by parsing the XML document.parser - the parser to parse the document with.ParserConfigurationException - if an XML (SAX) parser cannot be created.SAXException - if parsing the XML document failed.IOException - if reading the XML document failed.public <T> Optional<T> parseOnce(XmlParser<? extends T> parser) throws IOException, SAXException, ParserConfigurationException
nothing is returned.T - the type of the element produced by parsing the XML document.parser - the parser to parse the document with.nothing if the document has been
parsed before.ParserConfigurationException - if an XML (SAX) parser cannot be created.SAXException - if parsing the XML document failed.IOException - if reading the XML document failed.public String path()
Copyright © 2019. All rights reserved.