• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Tool for generating structured XML data from SQL queries

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic