Pardon my blasphemous words, but in vb.net they have their new DataSet which is XML, and they have a class, I can't think of it's name off hand, but You can pass DataSets/ResultSets to this class and it will create XML for you following a DTD. You can then pass it to a parser that will combine it with XSL to make a pretty or should I say as pretty as a web page can be html document. The coding is very minimal. My question: Is there an equivalent class in Java that can take a ResultSet from JDBC and convert it to XML, then pass the XML and the XSL sheet to a parser to automagically make HTML? Thanks Mark
It would suprise me if there wasn't but I don't have a specific tool in mind. However, Castor does have a utility for making a set of databean classes from a schema (and if all you have is a DTD, the tool includes a DTD - Schema converter). www.castor.org
Scott Bain<br />Senior Consultant<br />Net Objectives<br />425-591-5844<br /><a href="http://www.netobjectives.com" target="_blank" rel="nofollow">Net Objectives</a><br />----------------------------<br />* Sign up for our free newsletter by sending an e-mail to<br />info@netobjectives.com<br />* Learn about and join our design pattern community of practice by going to<br /><a href="http://www.netobjectives.com/dpexplained" target="_blank" rel="nofollow">www.netobjectives.com/dpexplained</a><br />* Alan Shalloway & Jim Trott's - Design Patterns Explained: A New Perspective on<br />Object-Oriented Design is now available<br />* Our new CDROM-based XML training is now available as well
Thanks, from my brief look at it. It looks like it handles the first part of translating the ResultSet into XML. Mark
Scott Bain
Ranch Hand
Joined: Dec 21, 2001
Posts: 46
posted
0
Right. The general idea behand castor is one of "data-binding" -- that is, the automatic marshalling and unmarshalling of an XML structure into (and back out of) a set of objects. You create objects (databeans), set their state, then marshall these into an XML structure (you can allow Castor to create this as it sees fit, or you can specify the nature of this structure with a mapping file, also in XML). Subsequently, or alternatively, you un-marshall this XML structure into a series of objects with state. You can start with the XML and have Castor make the objects, start with the objects and have Castor make the XML, or make both and create a mapping between them.
Doug Wang
Ranch Hand
Joined: Oct 05, 2001
Posts: 445
posted
0
I know some Database vendors have their own solution to this. But we are all looking forward to maturity of Sun's Data Access API and XML data-binding. (please refer to here) [ January 16, 2002: Message edited by: Doug Wang ] [ January 17, 2002: Message edited by: Doug Wang ]
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep