public final class XmlParser extends Object
Constructor and Description |
---|
XmlParser()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
XmlParser |
contentHandler(ContentHandler handler)
Sets a content handler.
|
void |
parse(InputStream stream)
Sets a content handler.
|
static XMLReader |
reader(boolean dtd,
boolean xinclude)
Returns an XML reader.
|
public XmlParser() throws SAXException, ParserConfigurationException
SAXException
- SAX exceptionParserConfigurationException
- parser configuration exceptionpublic XmlParser contentHandler(ContentHandler handler)
handler
- content handlerpublic void parse(InputStream stream) throws IOException, SAXException
stream
- input streamIOException
- I/O exceptionSAXException
- SAX exceptionpublic static XMLReader reader(boolean dtd, boolean xinclude) throws SAXException, ParserConfigurationException
dtd
- parse DTDsxinclude
- enable XIncludeSAXException
- SAX exceptionParserConfigurationException
- parser configuration exceptionCopyright © 2005–2023 BaseX Team. All rights reserved.