PHP Classes

Accessing Attribute Elements

Recommend this page to a friend!

      SimpleXML for PHP4  >  All threads  >  Accessing Attribute Elements  >  (Un) Subscribe thread alerts  
Subject:Accessing Attribute Elements
Summary:Accessing Attribute Elements
Messages:1
Author:marcus powell
Date:2008-08-19 16:41:03
 

  1. Accessing Attribute Elements   Reply   Report abuse  
Picture of marcus powell marcus powell - 2008-08-19 16:41:04
Hi,

I have a an xml file with a similar structure to this.

<Attributes>
<Attribute PID_ProductAttributeID="204783">
<PIM_ProductAttributeID>314</PIM_ProductAttributeID>
<AttributeValue>480mm</AttributeValue>
<FriendlyName>Height</FriendlyName>
</Attribute>
</Attributes>

How would i get the PID_ProductAttributeID value using your class.

Using simplexml with php5 I can do:

$object->Attributes['PID_ProductAttributeID']


Many Thanks

Marcus