pavanmach has asked for the wisdom of the Perl Monks concerning the following question:
I am sending XML file as under: copyscript_28jan230pm dummy.xml and it is validated correcly and the output is as under: Enter username for Romulus: ddfd Enter password: Enter username for EMTT1: ...... Romulus, EMTT1 are parsed from XML, and before parsing it is being validated. Now i wanted to copy same XML file dummy.xml to |.xml. I have done it as cp dummy.xml \|.xml in a linux box. and the code for validation is
Now as i supplied dummy.xml, there is no error and the xml file is parsed. when i supplied |.xml from the command line as <program_name> \|.xml, it is throwing an error as Invalid XML file,enter valid XML file, even though the xml file inside is wellformed and is same as dummy.xml . Can u please tell me how can we overcome this ?eval { $doc = $parser->parsefile ("$ARGV[0]"); }; if($@) { print "Invalid XML file,enter valid XML file \n"; exit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: xml validation using perl
by dHarry (Abbot) on Feb 05, 2010 at 12:20 UTC | |
by ikegami (Patriarch) on Feb 08, 2010 at 05:52 UTC | |
by dHarry (Abbot) on Feb 08, 2010 at 08:41 UTC | |
|
Re: xml validation using perl
by ikegami (Patriarch) on Feb 05, 2010 at 07:23 UTC |