ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-unix-users
perl-unix-users
[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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved