net.xoetrope.xml
Class XmlSource

java.lang.Object
  extended by net.xoetrope.xml.XmlSource

public class XmlSource
extends java.lang.Object

A simple wrapper for an XML data source, hiding details of how the XML is loaded

Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt


Constructor Summary
XmlSource()
           
 
Method Summary
static XmlElement read(java.io.Reader input)
          Read the passed Reader object and parse its contents into an XmlElement structure of the type defined in the XmlParserFactory.
static XmlElement read(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

XmlSource

public XmlSource()
Method Detail

read

public static XmlElement read(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

read

public static XmlElement read(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