perlDevsWorld has asked for the wisdom of the Perl Monks concerning the following question:
Hi All, How can I use XPATH to get the values from the XML. Did some research and installed XML::LibXML
XML file:<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Body> <oos:EmpDetailsResponse xmlns:oos="http://www.hrservcices.com/2. +0"> <oos:EmpName id="123">David</oos:EmpName> <oos:EmpName id="1431">George</oos:EmpName> <oos:EmpName id="543">Peter</oos:EmpName> <oos:EmpName id="434">Samuel</oos:EmpName> <oos:EmpName id="4353">Kathy</oos:EmpName> </oos:EmpDetailsResponse> </env:Body> </env:Envelope>
Output I should generate is:
123:David
1431:George
543:Peter
434:Samuel
4353:Kathy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting the values from XML using XPATH
by tangent (Parson) on Apr 07, 2015 at 21:12 UTC | |
by perlDevsWorld (Novice) on Apr 09, 2015 at 14:32 UTC | |
|
Re: Getting the values from XML using XPATH
by basiliscos (Pilgrim) on Apr 07, 2015 at 23:14 UTC | |
by Anonymous Monk on Apr 07, 2015 at 23:42 UTC | |
|
Re: Getting the values from XML using XPATH
by perlDevsWorld (Novice) on Apr 07, 2015 at 18:15 UTC | |
|
Re: Getting the values from XML using XPATH
by Anonymous Monk on Apr 07, 2015 at 22:35 UTC |