
July 17th, 2003, 06:21 AM
|
|
Junior Member
|
|
Join Date: Jul 2003
Location: East Sussex, UK
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
XML Schema to XML file
What is the best way to create an instance of an XML schema?
To break it down into further details: suppose an XML schema is given. I obtain the data from a user through a user-interface. Now, having obtained the data I would like to write an XML file with the data that corresponds to the given XML schema.
I would really appreciate some help on this. I had been looking at simple DOM parsers. However, a DOM parser reads and XML schema just as a simple XML file. A super-structure like the XSOM (from Sun's cool tools), Castor, Oracle XDK or Sun's JWSDP is much more helpful. Microsoft XML SDK seems to provide Schema Object Model too. But that again just reads the schema. There seems to be no quick way to generate an XML file from an XML schema in a very generalized way without using JAXB binding (Sun's JWSDP) or similar methods.
XMLSpy does generate a sample XML file from an XML schema with null or sample values in just one click. I would like to do this programmatically.
Thanks a lot in advance.
Last edited by xtremebytes : July 17th, 2003 at 06:37 AM.
|