Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: SQL -> XML Conversion

by mirod (Canon)
on Apr 09, 2003 at 08:49 UTC ( [id://249173]=note: print w/replies, xml ) Need Help??


in reply to SQL -> XML Conversion

It seems to me that you could patch XML::Generator::DBI.

line 122 is:

$proxy->send_tag($names->[$i], $row[$i], 3) if defined($row[$i]);

A quick fix (untested!), that would work just for you would be to replace this by:

if( defined($row[$i])) { $proxy->send_tag($names->[$i], $row[$i], 3); } else { $proxy->send_tag($names->[$i], '', 3); }

An even better fix would be to add an option in the new that would control whether SAX events are emitted or not for a NULL column.

Then send the patch to matts and make his day ;--)

Update: fixed the code (added brackets around the test). Thanks to gmax who tested it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-25 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found