net.xoetrope.xml.nanoxml
Class NanoXmlParser

java.lang.Object
  extended by net.xoetrope.xml.nanoxml.NanoXmlParser
All Implemented Interfaces:
XmlParser

public class NanoXmlParser
extends java.lang.Object
implements XmlParser

A wrapper for the NanoXml Parser

Copyright (c) Xoetrope Ltd., 2002-2003

$Revision: 2.2 $

License: see License.txt


Constructor Summary
NanoXmlParser()
           
 
Method Summary
 XmlElement createXmlElement(java.lang.String name)
          Create a basic XmlElement of the type registered in the XmlParserFactory
 XmlElement parse(java.io.Reader input)
          Read the passed Reader object and parse its contents into an XmlElement structure of the type defined in the XmlParserFactory.
 XmlElement parse(java.io.Reader input, java.lang.String schemaSource)
          Read the passed Reader object and parse its contents into an XmlElement structure of the type defined in the XmlParserFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NanoXmlParser

public NanoXmlParser()
Method Detail

createXmlElement

public XmlElement createXmlElement(java.lang.String name)
Create a basic XmlElement of the type registered in the XmlParserFactory

Specified by:
createXmlElement in interface XmlParser
Parameters:
name - The name of the new element
Returns:
The created XmlElement

parse

public XmlElement parse(java.io.Reader input,
                        java.lang.String schemaSource)
Read the passed Reader object and parse its contents into an XmlElement structure of the type defined in the XmlParserFactory. Validate the parsed XML with the schema file located at the file indicated by the schemaSource parameter

Specified by:
parse in interface XmlParser
Parameters:
input - The reader from which the content of the XML structure will be read
schemaSource - Location of the schema source which will be used to validate the parsed XML
Returns:
The root XmlElement resulting from the parsing of the XML

parse

public XmlElement parse(java.io.Reader input)
Read the passed Reader object and parse its contents into an XmlElement structure of the type defined in the XmlParserFactory.

Specified by:
parse in interface XmlParser
Parameters:
input - The reader from which the content of the XML structure will be read
Returns:
The root XmlElement resulting from the parsing of the XML