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
_______________________________________________
Perl-Unix-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs