[Perl-unix-users] XML Parse Error
by Jonathan Dudson other posts by this author
Oct 12 2009 4:55PM messages near this date
Re: [Perl-unix-users] Permistion Problem when run from the Web
|
Re: [Perl-unix-users] XML Parse Error
Hello Mailing List,
I am currently having issue using XML.
Code....
my $parser = XML::Parser-> new(ErrorContext => 2, Style => "Tree");
# make the xml accessable from OO type calls
my $xmlobj = XML::SimpleObject-> new($parser->parsefile($xml_file_path));
# for every <DataRow> tag assign it to $objDataBlock
my @PSTN_log=();
foreach my $objDataBlock ($xmlobj-> child("Report")->children("DataRow"))
{
Data Structure .....................
<Report>
<DataRow>
<TelephoneNumber> 123......</TelephoneNumber>
Etc......
</DataRow>
</Report>
However I still seem to be getting the following error, I would really
apprieciate any assistance anyone may be able to offer i have tried using
both
foreach my $objDataBlock ($xmlobj-> child("Report")->children("DataRow"))
{
foreach my $objDataBlock ($xmlobj-> child("Report")->child("DataRow")) {
But both seem to have the same error I am doing something silly I am sure.
no element found at line 1, column 0, byte 0:
at /usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi/XML/Parser.pm
line 187
Jay Dudson
Thread:
Jonathan Dudson
Bill Luebkert
|