wood burning stoves 2.0*
The moose likes Web Services and the fly likes Genrating xml from the given xsd Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Genrating xml from the given xsd" Watch "Genrating xml from the given xsd" New topic
Author

Genrating xml from the given xsd

Anchu ck
Greenhorn

Joined: Oct 21, 2010
Posts: 3
can any one tell me how to generate a xml file with the given xsd (we don't know abt xsd meaning dynamic generation of xml file with the given xsd using java.

Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
That's not possible. Generally, for each XSD, there's an unlimited number of XML documents that conform to it.

What are you actually trying to achieve?
Nir Tal
Greenhorn

Joined: Aug 31, 2010
Posts: 12
You can validate an XML against a specific XSD using Java. For generating an XML from an XSD, you can use software like XMLSpy.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
What is the source of the data which is supposed to go into the XML document?

What is the source of the XSD you are supposed to conform to?

Bill
Anchu ck
Greenhorn

Joined: Oct 21, 2010
Posts: 3
The xml document should contain dynamically generated values.

The the path of the xsd will be to the program as an input and the system should dynamically generate the values based on the xsd and create an xml document as an output file.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10067
    
163

Like Lester said, generating an xml from a xsd isn't practical. Why exactly do you want to generate the xml from xsd? And how do you plan to use that xml?

[My Blog] [JavaRanch Journal]
Anchu ck
Greenhorn

Joined: Oct 21, 2010
Posts: 3
Its possible to generate xml from xsd using jaxb.
if the xsd is static, we can create jaxb files and using that xml file can be created.
So, xsd will not change here.

But, my requirement is to create xml for xsds dynamically...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Genrating xml from the given xsd