net.xoetrope.xml
Interface XmlParser

All Known Implementing Classes:
JaxpXmlParser, NanoXmlParser

public interface XmlParser

An interface for abstracting the Xml parsers used by XUI

Copyright (c) Xoetrope Ltd., 2002-2003

$Revision: 2.2 $

License: see License.txt


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.
 

Method Detail

createXmlElement

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

Parameters:
name - The name of the new element
Returns:
The created XmlElement

parse

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.

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

parse

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

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