# XML Parsing using PHP - node attributes

**URL:** https://forum.kirupa.com/t/xml-parsing-using-php-node-attributes/252159
**Category:** programming
**Created:** [February 16, 2008, 11:04pm UTC](https://forum.kirupa.com/t/xml-parsing-using-php-node-attributes/252159 "2008-02-16T23:04:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Tom\_B](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@Tom\_B](https://forum.kirupa.com/u/Tom_B)
#### Post date: [February 16, 2008, 11:04pm UTC](https://forum.kirupa.com/t/xml-parsing-using-php-node-attributes/252159/1 "2008-02-16T23:04:21Z")

</div>

Hello, Im writing a web-app in php using the technique explained in the “XML Parsing using PHP” tutorials. The xml file is generated by another application so i cannot alter its structure.

My problem is that some of the information i need to display is stored as attributs e.g.

```auto

<notes>
  <notes name="headin">
    <notes name="sub-heding">
      <note name="note name">
        <text>
          note content here.
        </text>
      </note>
      <note name="note name">
        <text>
          note content here.
        </text>
      </note>
    <notes>
  </notes>
</notes>

```

is their a way to extract the attributes?
