Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: get specific value of element using xpath in perl

by haukex (Archbishop)
on Jun 27, 2017 at 08:44 UTC ( [id://1193669]=note: print w/replies, xml ) Need Help??


in reply to Re^2: get specific value of element using xpath in perl
in thread get specific value of element using xpath in perl

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.

Replies are listed 'Best First'.
Re^4: get specific value of element using xpath in perl
by snehit.ar (Beadle) on Jun 27, 2017 at 09:07 UTC
    I am glad you help me and shown correct path to brush-u my skills. Appreciate your help .Thank you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1193669]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-03-28 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found