Hey Dane ----- Original Message ----- From: "Dane Foster" <[EMAIL PROTECTED]> > "A few people have been thinking about mapping a JDBC ResultSet to an XML > representation lately, " > Why?
:-) Mostly an adapter so that without writing any code, if you have a ResultSet you get XPath and XSLT and to be able to pipe the data around as XML. e.g. its easy to turn XML into CSVs or HTML or whatnot using XSLT. > IMHO XML has grown into one heck of a hammer and you know what happens when > the only tool you have is a hammer? Everything looks like nails. The only > situation I can see (btw, I'm near sighted) a use for a ResultSet as XML is > to expose the information in the database to some system/process(es) that > doesn't know how to communicate with a database on its own. Exactly. So its only a fairly simple adapter we're talking about here to adapt an existing ResultSet appear to be a dom4j document fragment so that it can be piped into an XSLT engine, or navigated with XPath or output using some kind of XML text formatter or SAX stream. Its just an adapter really. Its not unlike Oracles XSQL apart from this would be open and flexible and not based on Oracle, just on JDBC and dom4j. > For those other > scenarios keep in mind that most database vendors today and probably all > tomorrow will support some form of publishing an XML view of the data. Agreed. And its not the intention of the JDBC <-> dom4j adapter to be *the* way to publish XML view of data from a database. Just one possible way. > Sorry about the rant, I really like and appreciate dom4j's clean and > efficient design. Its a testament to great and elegant OO programming and I > would hate to see it bogged down and smashed with the XML hammer mentioned > in the first paragraph. Me too! Thanks for the rant - I always enjoy them, especially on a friday when its nearly time to visit a bar ;-) I hear you and agree with your sentiments. Its too easy to XML-ercise everything just for the hell of it. Though one thing I've found though is piping information around the place as XML, while not always the most effcient, can often be very easy and a simple way to connect disperate bits of software together. Or to put that another way, I like to hide JDBC by just making the data available as XML instead. James _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user
