aspose file tools*
The moose likes XML and Related Technologies and the fly likes generating xml from schema Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "generating xml from schema" Watch "generating xml from schema" New topic
Author

generating xml from schema

Betsy Camel
Ranch Hand

Joined: Oct 02, 2003
Posts: 119
hi
i have to load a particular schema and generate a xml using the schema.
Is it possible to do this without using a tool. If so can anyone give me the code for this. ITs very urgent.
thx
betsy
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12836
    
    5
"without using a tool"??

The JAXB toolkit is Sun's toolkit for turning schema into code - does that count?
Bill
Betsy Camel
Ranch Hand

Joined: Oct 02, 2003
Posts: 119
IS there any way of generating a xml without JAXB by using DOM ? It is urgent plz help
Betsy Camel
Ranch Hand

Joined: Oct 02, 2003
Posts: 119
can anyone help me in compiling a schema using JAXB. but it should be code compiled & not command line.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18992
    
    8

If it's urgent, I wouldn't spend a lot of time writing code to generate a document from a schema. That would take a lot of time and be very difficult to get right. I would use a tool -- there are many available.
Betsy Camel
Ranch Hand

Joined: Oct 02, 2003
Posts: 119
Hi Paul...
for your kind info, i am developing an MVC architecture where i cant use somebody's else's tool.
And if you are not aware, please dont give silly answers.
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Originally posted by Betsy Camel:
Hi Paul...
for your kind info, i am developing an MVC architecture where i cant use somebody's else's tool.


I didn't get this...
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12836
    
    5
it should be code compiled & not command line.

I suppose you could use an exec() to run the JAXB compiler, but just glancing at the JAXB docs it does NOT look like an easy tool to automate with.

Just to back off from the problem a minute, what is the source of a schema that you have to turn into XML? What schema notation is it expressed in?

How much variation in schema will you have to cope with? Are there some regularities that we can take advantage of?

What is the source of the data that has to go into the XML?

And if you are not aware, please dont give silly answers.

No need to be snide if you want help from any forum, its up to you to filter out answers that dont help.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: generating xml from schema