Is it possible to generate XML from a DTD and ResultSet Object
Nikhil Vasaikar
Greenhorn
Joined: Sep 09, 2003
Posts: 22
posted
0
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
Joined: Apr 10, 2002
Posts: 170
posted
0
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.
Tony Yan<br /> <br />IBM Certified Developer XML and Related Technology<br />Sun Certified Web Component Developer For J2EE Platform<br />Sun Certified Programmer For Java 2 Platform
Nikhil Vasaikar
Greenhorn
Joined: Sep 09, 2003
Posts: 22
posted
0
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Is it possible to generate XML from a DTD and ResultSet Object