Originally posted as reply to Loading a Local File

Hi, I tried to use example mentioned but it is giving me error:

Couldn't open IO::File=GLOB(0x20569a8): No such file or directory at CheckFile_xml_reader.pl line 18.
I checked file, it is there.

Here's my code:

#!/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);
Here's xml file content:
<?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>
Can please someone help. Thanks!

In reply to Loading a Local XML File by novicepl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.