Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: SQL -> XML Conversion

by dakkar (Hermit)
on Apr 09, 2003 at 15:54 UTC ( #249271=note: print w/ replies, xml ) Need Help??

in reply to SQL -> XML Conversion

There is a very good reason for the current behaviour: NULL gets mapped to no element, empty string gets mapped to empty element.

If you really need to confuse the two concepts, you can write a SAX filter (put it between the generator and your consumer) which fills in the missing elements.

On a side note: if you need a CSV, why are you passing through XML?

        dakkar - Mobilis in mobile

Most of my code is tested...

Perl is strongly typed, it just has very few types (Dan)

Comment on Re: SQL -> XML Conversion
Replies are listed 'Best First'.
Re: Re: SQL -> XML Conversion
by set_uk (Pilgrim) on Apr 09, 2003 at 22:06 UTC
    I agree it appears confused. My theory was to query the db once - convert to XML then use multiple XSLT passes to build whatever output format I needed be it HTML, CSV or different XML format. It works ok - but the important thing is that I now know a hell of a lot more than when I started

      If you need them to be distributed by a web server, you could give AxKit a try. AxKit comes with the AxKit::XSP::ESQL taglib that you could use to query the database and output XML at your pleasure -which you could them make available as an HTML page or whatever format you like.

      If you are interested in AxKit and the ESQL taglib you could also take a look at this article: Fun with ESQL.


      The very nature of Perl to be like natural language--inconsistant and full of dwim and special cases--makes it impossible to know it all without simply memorizing the documentation (which is not complete or totally correct anyway).
      --John M. Dlugosz

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://249271]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2015-11-25 23:39 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (693 votes), past polls