I’m looking for the best approach to getting an XML document from a JDBC resultset. The structure of the XML isn’t awfully important, but it should be fairly speedy.
For clearification, I would like the data from the resultset and only enough metadata to identify the data (field names essentially). I’m working with MySQL, DB2, SQL Server at the moment, but the solution needs to be database agnostic (for XML in SQL Server isn’t a viable option).
Are you looking to convert the ResultSet table into XML? I don’t know of any thirdparty tool, but tt is not very difficult to roll one of your own.
Your two options are to either have a constant format:
Or metadata specific:
In the second case, you can’t define schema statically.