Tim Moores wrote:XSD is XML. Or are you asking about how to create an XML document that conforms to that XSD? That's not possible, as there will generally be an infinite number of XML documents that conform to any given schema.
Paul Clapham wrote:I have seen this question about a hundred times on various forums. Every time I see it I ask the question "Why would you want to do that?". So far I haven't received any good answers. So let me ask: Why would you want to do that?
Paul Clapham wrote:Or to look at it the other way around: if there's no reason to do it, then there's no reason to help you to do it.
(And my record is still perfect: nobody has yet stated a reason for doing this.)
James Boswell wrote:abhinav
You would need to parse the XSD file to pick out, at a minimum, the mandatory elements required in the XML file.
The JAXP tutorial may help you here: http://docs.oracle.com/javase/tutorial/jaxp/index.html
I do agree with Paul though. I see no reason why you would want to do this.
g tsuji wrote:Apart from the original question, I just want to record that I have strong disagreement with some opinions expressed so as to let other readers (present or future) know those opinions are in fact quite awkward, and/or in fact quite misleading in the least.
James Boswell wrote:abhinav
You would need to parse the XSD file to pick out, at a minimum, the mandatory elements required in the XML file.
The JAXP tutorial may help you here: http://docs.oracle.com/javase/tutorial/jaxp/index.html
I do agree with Paul though. I see no reason why you would want to do this.
There is no "i" in denial. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|