aspose file tools*
The moose likes XML and Related Technologies and the fly likes XSD to XML generation 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 "XSD to XML generation" Watch "XSD to XML generation" New topic
Author

XSD to XML generation

Vijay Raj
Ranch Hand

Joined: Oct 10, 2005
Posts: 110
Hi,

I am trying to read an XSD and generate xml based on it, tying together
data from a database. What are my technology options?

While googling, I read one option where I could use an XSD parser(like Xerces XML Schema API) and navigate thru the XSD and generate xml for each element. Are there any apis to generate elements into a DOM tree based on
XSD definitions?

I greatly appreciate if anyone who has done similar things could shed
some light on this.

Vijay.
Vijay Raj
Ranch Hand

Joined: Oct 10, 2005
Posts: 110
Please anyone, I really need help. Any pointers? I need to start with the development.

Regards,
Vijay.
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
I might be out of date, please tell me if I am wrong. Here are 2 answers I wrote several years ago.

http://bobcat.webappcabaret.net/javachina/faq/xml_01.htm#dtd_Q06

http://bobcat.webappcabaret.net/javachina/faq/xschema_01.htm#schema_Q04

Thanks!
Vijay Raj
Ranch Hand

Joined: Oct 10, 2005
Posts: 110
So do you say that I cannot generate XML depending upon the schema. The last statement in one of your posts "Then why we need the XML schema?" sounds fair.

Can I make a single XSD which covers all possible XML outputs(those legal in terms of my application), can I then generate the XML?

I was going through JAXB where in "xjc" was used to generate .java classes and then transformed to XML. I there anythign similar in Java 1.4 (xjc generates Java 5 code).

Regards,
Vijay.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Jerry, please refrain from advertising your product. All posts like that are moved to blatant advertising.

XMLSpy is a great program, but will not help the original poster as they are not looking to create xml docs through another program, but through Java code.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XSD to XML generation