which Java XML framework would be the best to create all possible XML files based on specified XSD file.
-
with a typical schema, "all possible" might exceed tens of thousands. Are you sure you want this?Bozho– Bozho2010-03-17 18:36:34 +00:00Commented Mar 17, 2010 at 18:36
-
yes, for testing purposeLaxmikanth Samudrala– Laxmikanth Samudrala2010-03-17 18:45:05 +00:00Commented Mar 17, 2010 at 18:45
-
1It may easily exceed tens of quadrillions. Think about a single string of a dozen characters (26^12=1e17, if you only consider simple letters).Chris Lercher– Chris Lercher2010-03-17 22:24:42 +00:00Commented Mar 17, 2010 at 22:24
Add a comment
|
2 Answers
Eclipse has tools for doing this and is probably free.
Once you've got the right version of Eclipse, open the existing schema file for editing (or create a new one: select File -> New... Other ... XML / XML Schema ). When you're ready to generate a test XML file, locate the file in the Package Explorer (the navigator view, usually on the left side), right click on it, and select Generate/XML File.
Comments
Oxygen is a tool that can generate xml files from xsd.
XMLBeans tools seem to offer this, too.
And something called "trang" appears to be able to do this.
4 Comments
Bozho
@Laxmikanth Samudrala Why do you need run-time generation? Won't static generation do?
Laxmikanth Samudrala
it's a large file and some real data want to set while creating the XML
Bozho
that doesn't answer why it needs to be at run-time
Bozho
@Laxmikanth Samudrala then you can use Oxygen to do it