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; }
In reply to xml validation using perl by pavanmach
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |