views:

23

answers:

0

Hi,

I want to parse an xml file using libxml2 and XPath

I have tried to look this up on the internet but I can't find much about it.

Can anyone give me a sample code for parsing this xml:

  <WebServiceResponse>  
     <status>OK</status>   
     <result>   
      <type>sample</type>    
      <name>Sample XML</name>    
      <location> 
       <lat>37.4217550</lat>    
       <lng>-122.0846330</lng>    
      </location>
     </result>  
     <result>   
      <message>The secret message</message>  
     </result> 
  </WebServiceResponse>

just so I can work further

thanks in advance