|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xml.XmlParserFactory
public class XmlParserFactory
A basic factory for setting XML parsers and createing new elements
Copyright (c) Xoetrope Ltd., 2002-2003
$Revision: 2.2 $
License: see License.txt
| Constructor Summary | |
|---|---|
XmlParserFactory()
null constructor for the XmlParserFactory |
|
| Method Summary | |
|---|---|
XmlElement |
createXmlElement(java.lang.String name)
Create a new XML element iwth the specified name |
static XmlParserFactory |
getInstance()
Get an instance of the parser factory |
XmlParser |
getParser()
If not already created, create an XmlParser and return it. |
XmlWriter |
getWriter(java.io.FileOutputStream fos)
If not already created, create an XmlWriter instance and return it. |
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)
Parse the input stream using a schema. |
void |
registerXmlClass(java.lang.Class clazz)
Register an xml element class. |
void |
registerXmlParser(XmlParser parser)
Register an XML parser |
void |
registerXmlWriter(XmlWriter writer)
Register an XML writer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlParserFactory()
| Method Detail |
|---|
public static XmlParserFactory getInstance()
public XmlElement parse(java.io.Reader input)
input - The reader from which the content of the XML structure will be
read
public XmlElement parse(java.io.Reader input,
java.lang.String schemaSource)
input - the input streamschemaSource - the schmea against which to validate.
public XmlParser getParser()
public XmlWriter getWriter(java.io.FileOutputStream fos)
fos - the file output stream for the new writer
public XmlElement createXmlElement(java.lang.String name)
name - the name of the element
public void registerXmlClass(java.lang.Class clazz)
clazz - The class representing the Xml class.public void registerXmlParser(XmlParser parser)
parser - The XmlParser which is being registeredpublic void registerXmlWriter(XmlWriter writer)
writer - The XmlWriter which is being registered
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||