Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Loading a Local XML File

by hippo (Chancellor)
on Aug 27, 2019 at 14:53 UTC ( #11105122=note: print w/replies, xml ) Need Help??


in reply to Loading a Local XML File

No such file or directory

If there's no such file or directory then either your file isn't really called sample_xml.xml or it isn't in the place you think it is.

Replies are listed 'Best First'.
Re^2: Loading a Local XML File
by novicepl (Initiate) on Aug 27, 2019 at 14:58 UTC
    File is there at the same location where pl file is: devserver$ ls -al CheckFile_xml_reader.pl -rwxrwxrwx 1 svcinfrastagingshare root 395 Aug 27 10:46 CheckFile_xml_reader.pl devserver$ ls -al sample_xml.xml -rwxrwxrwx 1 svcinfrastagingshare root 556 Aug 27 10:45 sample_xml.xml devserver$

      Use parse() method for file handle, not parsefile()

      #$parser->parsefile($fileStream); $parser->parse($fileStream);
      or with filename using parsefile()
      $parser->parsefile('sample_xml.xml');
      poj
        Hi poj, Getting following error either way i.e. $parser->parse($fileStream); or $parser->parsefile('sample_xml.xml'); Undefined subroutine &main::hdl_def called at /usr/lib64/perl5/vendor_perl/XML/Parser/Expat.pm line 470.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11105122]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2019-12-14 13:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?