Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSD to XML generation

 
Vijay Raj
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please anyone, I really need help. Any pointers? I need to start with the development.

Regards,
Vijay.
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic