ravi06 has asked for the wisdom of the Perl Monks concerning the following question:
I want to first check value of Id in xapth1 and if it is not present, it should look into xpath2.foreach my $node ($xpc->findnodes('/xpath1 | /xpath2')) { foreach my $col(qw/Id Title Book Publisher Platform/) { print $xpc->findvalue($chapter_columns{$col}, $node); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How can I force findnodes() to check value of attributes in either xpath1 or xpath2?
by Corion (Patriarch) on Jul 19, 2013 at 11:25 UTC | |
by ravi06 (Novice) on Jul 19, 2013 at 11:31 UTC | |
by Corion (Patriarch) on Jul 19, 2013 at 11:42 UTC | |
by ravi06 (Novice) on Jul 19, 2013 at 12:44 UTC | |
by Corion (Patriarch) on Jul 19, 2013 at 12:46 UTC | |
|
Re: How can I force findnodes() to check value of attributes in either xpath1 or xpath2?
by choroba (Cardinal) on Jul 19, 2013 at 12:02 UTC |