org.jaffa.tools.patternengine
Class DomParser

java.lang.Object
  extended byorg.jaffa.tools.patternengine.DomParser

public class DomParser
extends Object

This parses an input XML file into a Map of Maps.


Nested Class Summary
static class DomParser.ValueObject
          A value in the input XML stream can be represented as a ValueObject.
 
Constructor Summary
DomParser()
           
 
Method Summary
static Map parse(String uri)
          Parses the XML without validating it.
static Map parse(String uri, boolean validate)
          Parses the XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomParser

public DomParser()
Method Detail

parse

public static Map parse(String uri)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Parses the XML without validating it. It returns a Map.

Parameters:
uri - The location of the content to be parsed.
Returns:
The Map.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration requested.
SAXException - If any parse errors occur.
IOException - If any IO errors occur.

parse

public static Map parse(String uri,
                        boolean validate)
                 throws ParserConfigurationException,
                        SAXException,
                        IOException
Parses the XML. It returns a Map.

Parameters:
uri - The location of the content to be parsed.
validate - if the XML is to be validated while parsing.
Returns:
The Map.
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration requested.
SAXException - If any parse errors occur.
IOException - If any IO errors occur.


Copyright © 2002-2004 JAFFA Project.