L
lievemario
hey,
I've wrote a perl script which gets data out of a mysql database and convert
it to xml.
It works with the XML::Handler::YAWriter,
here is the code;
use strict;
use DBI;
use XML::Generator:
BI;
use XML::Handler::YAWriter;
my $dbh = DBI->connect ("DBI:mysql:myDB", "myUID", "myPassword",
{ RaiseError => 1, PrintError => 0});
my $out = XML::Handler::YAWriter->new (AsFile => "test.xml");
my $gen = XML::Generator:
BI->new ( Handler => $out, dbh => $dbh );
$gen->execute ("SELECT *
FROM someTable");
$dbh->disconnect ();
I do not get any errors when executing the script,
but when I try to open the test.xml file, it has an error
in it:
<name>th?/name>
this should be:
<name>thé</name>
Has anyone an idea how I can solve this?
thx!
I've wrote a perl script which gets data out of a mysql database and convert
it to xml.
It works with the XML::Handler::YAWriter,
here is the code;
use strict;
use DBI;
use XML::Generator:
use XML::Handler::YAWriter;
my $dbh = DBI->connect ("DBI:mysql:myDB", "myUID", "myPassword",
{ RaiseError => 1, PrintError => 0});
my $out = XML::Handler::YAWriter->new (AsFile => "test.xml");
my $gen = XML::Generator:
$gen->execute ("SELECT *
FROM someTable");
$dbh->disconnect ();
I do not get any errors when executing the script,
but when I try to open the test.xml file, it has an error
in it:
<name>th?/name>
this should be:
<name>thé</name>
Has anyone an idea how I can solve this?
thx!