*
The moose likes Java in General and the fly likes Tool for generating structured XML  data from SQL queries Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Tool for generating structured XML  data from SQL queries" Watch "Tool for generating structured XML  data from SQL queries" New topic
Author

Tool for generating structured XML data from SQL queries

Scott William Sinclair
Greenhorn

Joined: Oct 12, 2004
Posts: 8
Hi,

I have been given the task of generating XML documents by extracting data from a database and then structuring it as needed and then outputing XML. The XML produced is completely determined by a configuration file.

I didn't find much information on the web about this, but it seems to me that the best approach is to use DOM to build the data structure and then transform it using XSLT.

The advantages would be:
standard DOM API to build datastructure makes for better maintainability.
easily enrich the datastructure by adding more elements, etc.
use standard XSLT to transform the data into the desired output format.
have the rich language of XSL to transform the data.

The disadvantage would basiclly be speed, since XSLT is not particularly fast, but since XSLT technology will improve over time especially with XSLT compilers, this disadvantage will probably become smaller and smaller.

I would be really interested in any comments on this approach or any alternative suggestions or technologies I can use. Also what would be the most efficient XSLT transformer to use and what would be the best toolkit for performing XPaths directly on a DOM structure. e.g. a tool that can do something like.



The origonal idea was to build our own data structures, and build our own expressions to allow us to access the data structure in the configuration, but this would be quite hard to do properly, and would not have the expressive power of XPATH. The advantage of doing this ourselves then would be speed, but it would probably require a lot more work.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tool for generating structured XML data from SQL queries
 
Similar Threads
Reading / Storing Data Without Knowing What it Is
DOM OR SAX
DOM or SAX confusing
Consider Haskell in lieu of DOM, SAX, or XSLT for processing XML data
Errors in DOM/SAX Mock exams ???