in reply to Re: extracting attribute values which might have multiple occurences from xml file
in thread extracting attribute values which might have multiple occurences from xml file
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: extracting attribute values which might have multiple occurences from xml file
by choroba (Cardinal) on Jan 30, 2015 at 21:51 UTC | |
by perlDevsWorld (Novice) on Jan 30, 2015 at 22:34 UTC | |
by perlDevsWorld (Novice) on Jan 30, 2015 at 22:13 UTC | |
by choroba (Cardinal) on Jan 30, 2015 at 22:18 UTC |