<> wrote in message
news: oups.com...
> Hello...
>
> Is it possible to parse ( or rather read) an xsd file and depending on
> the constraints in the xsd...develop a java code to generate xml
> instances confirming to the xsd ?
>
> i am working on something called "template based code generation" where
> in my template is an xsd file which i have to read and create xml
> instances confirming to the xsd .
> after that these xml instances would be used as data inputs to another
> code which will be used to generating test cases.
I think it is always possible, given a valid XSD, to generate an XML
that conforms to that XSD, and I think it may even be feasible (perhaps even
trivial?) to implement a program to do this for you. However, I'm not sure
why this would be useful. E.g. my implementation would always generate the
minimum XML possible. If the empty document is legal, that's what it will
generate.
- Oliver
|