Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts.tiles.xmlDefinition
Class XmlParser

    java.lang.Object
      org.apache.struts.tiles.xmlDefinition.XmlParser

    public class XmlParser

extends Object

Parse an XML definitions file.

Field Summary
`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 Summary
`XmlParser()` Constructor.

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### digester

    protected org.apache.commons.digester.Digester digester

  Associated digester.

### validating

    protected boolean validating

  Should we use a validating XML parser to read the configuration file. Default is `false`.

### registrations

    protected String[] 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 Detail

### XmlParser

    public XmlParser()

  Constructor. Creates a digester parser and initializes syntax rules.

Method Detail

### 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

    public void parse(InputStream in,
                      XmlDefinitionsSet definitions)
               throws IOException,
                      SAXException

  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

    public static void main(String[] args)

  Main method to check file syntax.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.