problem with xml and xpath in PHP

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

hello group,

I need to extract information from an XML file (http:// Now, using following function I'm
able to read the user_agent's value:

           $devices = $xml->xpath('devices/device/@user_agent');

But when I try to read "Capability" element vlaue which is "Audivox" I
don't get anything.  or if  I try to read "model_name" it will return

          $capability = $xml->xpath('devices/device/group/capability/

How should I address value="Audiovox" ?


A block sample of the XML I'm reading.

 <device user_agent="AUDIOVOX-CDM180" actual_device_root="true"
fall_back="generic" id="audiovox_cdm180_ver1">
  <group id="product_info">
    <capability name="brand_name" value="Audiovox"/>
    <capability name="model_name" value="CDM-180"/>

Site Timeline