errors:#! perl -w use warnings; use strict; use XML::XSH2; my $tempVal = XML::XSH2->new( twig_handlers => { /httpsRoutes/httpsRou +te } ); $tempVal->parsefile("c:\\location\\test.xml"); for ($tempVal) { echo @hostname (key) @tier | cat > out.txt; }
C:\Strawberry\perl\bin>perl "C:\location\xmlRead_2.pl" Array found where operator expected at C:\location\xmlRead_2.pl line 10, at end of line (Missing operator before ?) Array found where operator expected at C:\location\xmlRead_2.pl line 10, at end of line (Missing operator before ?) Unknown regexp modifier "/h" at C:\location\xmlRead_2.pl line 6, at end of line Unknown regexp modifier "/t" at C:\location\xmlRead_2.pl line 6, at end of line Unknown regexp modifier "/t" at C:\location\xmlRead_2.pl line 6, at end of line Unknown regexp modifier "/R" at C:\location\xmlRead_2.pl line 6, at end of line Unknown regexp modifier "/t" at C:\location\xmlRead_2.pl line 6, at end of line Unknown regexp modifier "/e" at C:\location\xmlRead_2.pl line 6, at end of line syntax error at C:\location\xmlRead_2.pl line 10, near "echo @hostname " Global symbol "@hostname" requires explicit package name at C:\location\xmlRead_2.pl line 10. Global symbol "@tier" requires explicit package name at C:\location\xmlRead_2.pl line 10. Execution of C:\location\xmlRead_2.pl aborted due to compilation errors.
In reply to Re^2: extracting attribute values which might have multiple occurences from xml file
by perlDevsWorld
in thread extracting attribute values which might have multiple occurences from xml file
by perlDevsWorld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |