This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it possible to generate XML from a DTD and ResultSet Object

 
Nikhil Vasaikar
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we generate an XML File using a DTD and a ResultSet Object?
I have a deadline for my deliverable. What I am trying to achieve is mentioned in my post which has the multiple nesting of parent child nodes.
[ October 02, 2003: Message edited by: Nikhil Vasaikar ]
 
Tony Yan
Ranch Hand
Posts: 170
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting thought. Typically, you validate an XML with a DTD. I think given a DTD, there can be mutiple instance of XML's that validatable against it. Therefore, in principle, you can get mutiple (underterministic) XML instances from one DTD and a ResultSet. I guess the easiest way is to generate XML from the RS and validate it against the DTD.
Hope it makes sense.
 
Nikhil Vasaikar
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your suggestion definitely makes sense. I am using DOM to generate XML file from a ResultSet. In doing so i have to hard code the parent chid nesting at multiple levels. If I have a DTD in which all parent child nodes are defined then all I have to do is pick up the nesting from the DTD and generate the XML. This aproach will also help me in maintaining the code, say later on if i wish to change the parent child nesting all I have to do is change the nesting in the DTD. Well, this is just my perception. Correct me if I am wrong.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic