XML Parser.
by Karthik Ramaswamy other posts by this author
May 14 2007 12:54AM messages near this date
view in the new Beta List Site
Re: replacing & in a string
|
Re: XML Parser.
& XSLT my $xmlobject = XML::Parser-> new(Style => $self->{_style});
eval
{
$xmldata = $xmlobject-> parse($data);
# use Data::Dumper;print Dumper([$xmldata]);
};
if ($@)
{
handleError(30112, "$@");
$xmldata-> {badfile}=&File::Basename::basename($file);
use Data::Dumper;print Dumper([$xmldata]);
improperXML($xmldata);
}
In the above code the file being parsed has one & character in the 42nd line
and beacuse of that whatever was parsed got cleared with not well-formed
error.So after that error $xmldata when dumped is
{
'badfile' => 'SSC_69ME5117211_20070424104107.xml'
}
Now what I want is the data parsed till then .
--
Regards
Karthik
Thread:
Karthik Ramaswamy
Liam Quin
|