codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Urgent:- Please help me out with error XML:Parser no element found  Sudarshan H at 11:26 on Friday, June 06, 2008
 

I am beginer Please help me out with the Error..

Do i need to do an exception handling.
please guide me its urgent

XML::Parser:
no element found at line 3, column 0, byte 123 at /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris-thread-multi/XML/Parser.pm line 187

while updating the data from XML file to database table.

L4PLogger::Trapper::PRINT('L4PLogger::Trapper=ARRAY(0x1dc7cc)', '\x{a}no element found at line 3, column 0, byte 123 at /usr/local...') called at /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris-thread-multi/XML/Parser.pm line 192, XML::Parser::parse('XML::Parser=HASH(0x20864e8)', '<?xml version="1.0" encoding="iso-8859-1" ?>\x{a}<?meta name="GEN...') called at /usr/local/lib/perl5/site_perl/5.8.8/XML/Simple.pm line 414, XML::Simple::build_tree_xml_parser('XML::Simple=HASH(0x1bffc84)', 'undef', 'SCALAR(0x208a030)') called at /usr/local/lib/perl5/site_perl/5.8.8/XML/Simple.pm line 353, XML::Simple::build_tree('XML::Simple=HASH(0x1bffc84)', 'undef', 'SCALAR(0x208a030)') called at /usr/local/lib/perl5/site_perl/5.8.8/XML/Simple.pm line 308, XML::Simple::build_simple_tree('XML::Simple=HASH(0x1bffc84)', 'undef', 'SCALAR(0x208a030)') called at /usr/local/lib/perl5/site_perl/5.8.8/XML/Simple.pm line 270, XML::Simple::parse_string('XML::Simple=HASH(0x1bffc84)', 'SCALAR(0x208a030)') called at /usr/local/lib/perl5/site_perl/5.8.8/XML/Simple.pm line 171, XML::Simple::XMLin('XML::Simple=HASH(0x1bffc84)', '<?xml version="1.0" encoding="iso-8859-1" ?>\x{a}<?meta name="GEN...') called at /var/www/brews/bin/ld_usrs line 70

Part of the code

here is the method in XML:Parser Package.
my $xs = XML::Simple->new();
my ($cost_center,$email,$first_name,$middle,$last_name,$full_name,$status,$employment_type);
my $failures = 0;
APPROVER: for my $approver (sort keys %{$approvers}) {
$logger->info("Test :- The approver entering into for loop :$approver");
my $is_changed = 0;
$logger->logdie("Unable to retrieve user data for 10 users from People Lookup service! Most likely down.") if ($failures >= 10);
my $XML = XML::Smart->new("${Brews::people_lookup_url}?sid=$approver");
'here should i do an exceptionhandling please guide me
my $xml = $XML->data;
unless ($xml) {
$logger->warn("Unable to retrieve user data from People Lookup for $approver");
$failures++;
next APPROVER;
}
my $ref = $xs->XMLin($xml);
my $data = $ref->{'EmployeeProfile'};
$cost_center = $data->{'Dept-CostCtrNo'} + 0;








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Array within array
•  Hey all could some 1 help me ?? thanks
•  Re: Checking for a File that Does Not Exist (Yet)
•  mouse trailer
•  Problems in login using WWW::Mechanize
•  using javascript to embed videos
•  Re: really lost my syntax
•  Urgent:- Please help me out with error XML:Parser no element found
•  Urgent:- Please help me out with error XML:Parser no element found


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2008