Hi ikegami,
Thanks very much for your reply. I didn't have XML::LibXML installed on my PC (Kubuntu), so I went into cpan and installed it, but cpan is complaining:
It says no Makfile, and it's right. So I went into the directory. There is a Makefile.PL, So I executed it and I got "Makefile.PL: command not found":
root@steve-desktop:~/.cpan/build/XML-LibXML-1.70-XzsnvX# dir
Av_CharPtrPtr.c Changes docs dom.h lib LibXML.pod LICEN
+SE MANIFEST perl-libxml-mm.c perl-libxml-sax.c ppport.h t
+ TODO xpath.c xpath.h
Av_CharPtrPtr.h debian dom.c example LibXML.pm LibXML.xs Makef
+ile.PL META.yml perl-libxml-mm.h perl-libxml-sax.h README test
+ typemap xpathcontext.h
root@steve-desktop:~/.cpan/build/XML-LibXML-1.70-XzsnvX# Makefile.PL
Makefile.PL: command not found
root@steve-desktop:~/.cpan/build/XML-LibXML-1.70-XzsnvX#
I'm now looking for another Parser - maybe I could just use a regular expression?
Update I've tried this regular expression and it seems to work.
#!/usr/bin/perl -w
use strict;
use warnings;
my $xml = '<?xml version="1.0"?><root>í</root>';
print($xml,"\n");
$xml =~ s/\&\#(\d*);/chr($1)/gse;
print($xml,"\n");
So thanks again for pointing me in the right direction, ikegami, as always.
Regards
Steve |