"be consistent" | |
PerlMonks |
Re^3: get specific value of element using xpath in perlby haukex (Archbishop) |
on Jun 27, 2017 at 08:44 UTC ( [id://1193669]=note: print w/replies, xml ) | Need Help?? |
Note that whitespace is significant, and the text content of the node is not 'Service Name', but "\nService Name". One quick way to fix this is by changing your XPath expression to q{//custom_attribute_list/custom_attribute[normalize-space(name)='Service Name']/value}. Since your question is more about XML and XPath than Perl, I recommend you familiarize yourself with those some more, for example at w3schools.
In Section
Seekers of Perl Wisdom
|
|