public class XmlParser extends Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.digester.Digester |
digester
Associated digester.
|
protected String[] |
registrations
The set of public identifiers, and corresponding resource names for
the versions of the configuration file DTDs we know about.
|
protected boolean |
validating
Should we use a validating XML parser to read the configuration file.
|
Constructor and Description |
---|
XmlParser()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
initDigester(org.apache.commons.digester.Digester digester)
Init digester.
|
static void |
main(String[] args)
Main method to check file syntax.
|
void |
parse(InputStream in,
XmlDefinitionsSet definitions)
Parse input reader and add encountered definitions to definitions set.
|
void |
setValidating(boolean validating)
Set digester validating flag.
|
protected org.apache.commons.digester.Digester digester
protected boolean validating
false
.protected String[] registrations
public XmlParser()
public void setValidating(boolean validating)
protected void initDigester(org.apache.commons.digester.Digester digester)
digester
- Digester instance to use.public void parse(InputStream in, XmlDefinitionsSet definitions) throws IOException, SAXException
in
- Input stream.definitions
- Xml Definitions set to which encountered definition are added.IOException
- On errors during file parsing.SAXException
- On errors parsing XML.public static void main(String[] args)
Copyright © 2000–2017 Apache Software Foundation. All rights reserved.