Hi List, I'm struggeling with the following:
There is a blob field in the oracle db which contains xml...
I want to read this blob and make a single xml file out of it...
Now when using the code below I get the data out of the blob with parts of xml
but its all messed up...
¬Ã^@^Esr^@^Porg.jdom.Element°^]<84>Ã^QÃ^D:^C^@^CL^@
attributest^@^XLorg/jdom/AttributeList;L^@^Gcontentt^@^VLorg/jdom/ContentList;L^@^Dnamet^@^RLjava/lang/String;xr^@^Porg.jdom.ContentBá<91>ÃbS<99>G^B^@^AL^@^Fparentt^@^QLorg/jdom/Parent;xppsr^@^Vorg.jdom.AttributeList
^YZ¨téÃ^@^CI^@^Dsize[^@^KelementDatat^@^U[Lorg/jdom/Attribute;L^@^Fparentt^@^RLorg/jdom/Element;xp^@^@^@^@pq^@~^@^Fsr^@^Torg.jdom.ContentList^@^@^@^@^@^@^@^²4^B^@^@xp^@^@^@^Hsq^@~^@^@q^@~^@^Fsq^@~^@^G^@^@^@^@pq^@~^@^Psq^@~^@^K^@^@^@^Guq^@~^@^^@^S[Lorg.jdom.Content;]Ã+mÂÃ
N^@^@^@^Hsq^@~^@^@q^@~^@^Psq^@~^@^G^@^@^@^@pq^@~^@^Tsq^@~^@^K^@^@^@^Auq^@~^@^N^@^@^@^Esr^@^Morg.jdom.Text^OöÃhw"m<89^B^@^AL^@^Evalueq^@~^@^Cxq^@~^@^Dq^@~^@^Tt^@^QmkjjKL565udFGJERdppppq^@~^@^Tt^@^KsecurityKeyt^@^@t^@3http://www.mondial-assistance.com/ecommerce/schema/w^A^@xsq^@~^@^@q^@~^@^Psq^@~^@^G^@^@^@^@pq^@~^@^^sq^@~^@^K^@^@^@^Auq^@~^@^N^@^@^@^Esq^@~^@^Xq^@~^@^^t^@^CTSVppppq^@~^@^^t^@^KpartnerNameq^@~^@^\q^@~^@
Etc etc.... Code below...
#!/usr/bin/perl
use warnings;
use strict;
use DBI;
my $db = DBI->connect("dbi:Oracle:host=????;sid=???", "???", "???", {RaiseError
=> 1}) or die "$DBI::errstr";
open XML, ">./xmlfile"
or die "Can't create xml file ($!)";
# Set Max BLOB size
$db->{LongReadLen} = 150000;
# Select statement
my $SEL = "select xml_message from table where bla = 'bla'";
# Prepare select
my $sth = $db->prepare($SEL);
# Execute select
$sth->execute();
my @row = $sth->fetchrow_array();
print XML "$row[0]\n";
# Disconnect from DB when finished
$db->disconnect if defined($db);
Any help is appreciated!
[cid:blank29.gif]
Marco van Kammen
Applicatiebeheerder
[cid:blank4823.gif]
[cid:blank6784.gif]
Mirabeau | Managed Services Dr. C.J.K. van Aalstweg 8F 301, 1625 NV Hoorn
+31(0)20-5950550 - www.mirabeau.nl<http://www.mirabeau.nl>
[Mirabeau]
[cid:leaf3d6c.gif] Please consider the environment before printing this
email
<<inline: blank29.gif>>
<<inline: blank4823.gif>>
<<inline: blank18be.gif>>
<<inline: blank6784.gif>>
<<inline: miralogo4ae1.png>>
<<inline: leaf3d6c.gif>>
