novicepl has asked for the wisdom of the Perl Monks concerning the following question:
Originally posted as reply to Loading a Local File
Hi, I tried to use example mentioned but it is giving me error:
I checked file, it is there.Couldn't open IO::File=GLOB(0x20569a8): No such file or directory at CheckFile_xml_reader.pl line 18.
Here's my code:
Here's xml file content:#!/perl/bin/perl -w use strict; use XML::Parser; use IO::File; my $fileStream = new IO::File ("sample_xml.xml"); my $parser = new XML::Parser ( Handlers => { # Creates our parser object Start => \&hdl_start, End => \&hdl_end, Char => \&hdl_char, Default => \&hdl_def, } ); $parser->parsefile($fileStream);
Can please someone help. Thanks!<?xml version="1.0" encoding="UTF-8"?><root xmlns="http://www.informat +ica.com/Parameterization/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSc +hema" version="2.0"> <!--Specify deployed application specific parameters here.--> <!-- <application name="APP_AAA"> <workflow name="WF_XYZ"/> </application> --> <project name="PRJ_AAA"> <workflow name="WF_XYZ"> <parameter name="PARM_SRC_NAME">abc</parameter> <parameter name="PARM_TGT_NAME">xyz</parameter> </workflow> </project> </root>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Loading a Local XML File
by hippo (Archbishop) on Aug 27, 2019 at 14:53 UTC | |
by novicepl (Initiate) on Aug 27, 2019 at 14:58 UTC | |
by poj (Abbot) on Aug 27, 2019 at 15:13 UTC | |
by novicepl (Initiate) on Aug 27, 2019 at 15:21 UTC | |
by poj (Abbot) on Aug 27, 2019 at 15:45 UTC | |
Re: Loading a Local XML File
by Jenda (Abbot) on Sep 12, 2019 at 15:02 UTC |