|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exolab.castor.xml.schema.util.XMLInstance2Schema
public class XMLInstance2Schema
A class for reading XML Schemas. To generate an XML schema from a given XML document instance and write it to a file, please use code similar to the following: InputSource inputSource = ...; XMLInstance2Schema xi2s = new XMLInstance2Schema(); Schema schema = xi2s.createSchema(inputSource); Writer dstWriter = new FileWriter(...); xi2s.serializeSchema(dstWriter, schema); dstWriter.close();
| Constructor Summary | |
|---|---|
XMLInstance2Schema()
Creates a new XMLInstance2Schema |
|
| Method Summary | |
|---|---|
Schema |
createSchema(InputSource source)
Creates an XML Schema using the given InputSource. |
Schema |
createSchema(Reader reader)
Creates an XML Schema using the given Reader. |
Schema |
createSchema(String filename)
Creates an XML Schema using the given XML instance filename. |
static void |
main(String[] args)
For testing purposes only. |
void |
serializeSchema(Writer dstWriter,
Schema schema)
Serializes a Schema instance to the given Writer instance. |
void |
setDefaultGroupingAsAll()
Sets the default grouping as "all". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLInstance2Schema()
| Method Detail |
|---|
public Schema createSchema(String filename)
throws IOException
filename - the filename for the XML document
IOException
public Schema createSchema(Reader reader)
throws IOException
reader - the Reader for the XML document
IOException
public Schema createSchema(InputSource source)
throws IOException
source - the InputSource for the XML document
IOExceptionpublic void setDefaultGroupingAsAll()
public void serializeSchema(Writer dstWriter,
Schema schema)
throws IOException,
SAXException
Schema instance to the given Writer instance.
dstWriter - The Writer instance to output the XML schema to.schema - The XML Schema instance to be output.
IOException - If there's a problem related to writing to the given Writer instance.
SAXException - If there's a problem related to SAX streaming.public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||