• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Genrating xml from the given xsd

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can validate an XML against a specific XSD using Java. For generating an XML from an XSD, you can use software like XMLSpy.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Anchu ck
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
reply
    Bookmark Topic Watch Topic
  • New Topic