Class XmlParser
java.lang.Object
org.apache.struts.tiles.xmlDefinition.XmlParser
Parse an XML definitions file.
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.apache.commons.digester.Digester
Associated digester.protected String[]
The set of public identifiers, and corresponding resource names for the versions of the configuration file DTDs we know about.protected boolean
Should we use a validating XML parser to read the configuration file. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
initDigester
(org.apache.commons.digester.Digester digester) Init digester.static void
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.
-
Field Details
-
digester
protected org.apache.commons.digester.Digester digesterAssociated digester. -
validating
protected boolean validatingShould we use a validating XML parser to read the configuration file. Default isfalse
. -
registrations
The set of public identifiers, and corresponding resource names for the versions of the configuration file DTDs we know about. There MUST be an even number of Strings in this list!
-
-
Constructor Details
-
XmlParser
public XmlParser()Constructor. Creates a digester parser and initializes syntax rules.
-
-
Method Details
-
setValidating
public void setValidating(boolean validating) Set digester validating flag. -
initDigester
protected void initDigester(org.apache.commons.digester.Digester digester) Init digester.- Parameters:
digester
- Digester instance to use.
-
parse
Parse input reader and add encountered definitions to definitions set.- Parameters:
in
- Input stream.definitions
- Xml Definitions set to which encountered definition are added.- Throws:
IOException
- On errors during file parsing.SAXException
- On errors parsing XML.
-
main
Main method to check file syntax.
-