# XML parsing using PHP

**URL:** <https://forum.kirupa.com/t/xml-parsing-using-php/310935>\
**Category:** programming\
**Created:** [June 23, 2010, 12:04pm UTC](https://forum.kirupa.com/t/xml-parsing-using-php/310935 "2010-06-23T12:04:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![exhaler](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@exhaler](https://forum.kirupa.com/u/exhaler)\
**Post date:** [June 23, 2010, 12:04pm UTC](https://forum.kirupa.com/t/xml-parsing-using-php/310935/1 "2010-06-23T12:04:50Z")

</div>

Hi,  
i’m using this great tutorial to view an xml using php [http://www.kirupa.com/web/xml\_php\_parse\_intermediate.htm](http://www.kirupa.com/forum/../web/xml_php_parse_intermediate.htm)

however in my xml file i have somehting like this:

```auto
<content Name="Press Releases">
    <article Thumb="press/vanityfair.jpg">
        <headline>Vanity Fair </headline>
        <date>March 2010</date>
        <copy_intro><![CDATA[<a href="http://www.ghadahparis.com/press/vanity.pdf" target="_blank">Download as PDF</a>]]></copy_intro>
        </article>
</content>

```

i want to retrieve the attribute of the article tag “thumb”, where should i put the [FONT=Verdana, Arial, Helvetica, sans-serif][SIZE=2]getAttributeNode() in the above code for this work?  
i’ve tried this:  
[/SIZE][/FONT]

```auto
$story_array[$counter]->thumb->[FONT=Verdana, Arial, Helvetica, sans-serif][SIZE=2]getAttributeNode('Thumb')[/SIZE][/FONT] = $data;

```

but didn’t work

thanks for the help
