# Article: XML Parsing using PHP {Intermediate}

**URL:** <https://forum.kirupa.com/t/article-xml-parsing-using-php-intermediate/254094>\
**Category:** programming\
**Created:** [March 7, 2008, 10:56pm UTC](https://forum.kirupa.com/t/article-xml-parsing-using-php-intermediate/254094 "2008-03-07T22:56:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe23](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@joe23](https://forum.kirupa.com/u/joe23)\
**Post date:** [March 7, 2008, 10:56pm UTC](https://forum.kirupa.com/t/article-xml-parsing-using-php-intermediate/254094/1 "2008-03-07T22:56:27Z")

</div>

Hi all,

I’ve just finished following the excellent “[XML Parsing using PHP {Intermediate}](http://www.kirupa.com/web/xml_php_parse_intermediate.htm)” tutorial on [kirupa.com](http://kirupa.com) and the basics are working perfectly.

I have an XML feed of server statuses, of which the structure is:

```auto

<monitors>
     <monitor id="1">
          <name>Server 1</name>
          <type>HTTP</type>
          <since>01/01/2008</since>
          <status>OK</status>
          <availability>
               <outages>0</outages>
               <downtime>0</downtime>
               <available>100</available>
          </availability>
     </monitor>
</monitors>

```

I can pull out “name”, “type”, “since” and “status” fine. However, it falls over when trying to extract anything nested inside “availability”, using:

```php

$xml_outages_key = "*MONITORS*MONITOR*AVAILABILITY*OUTAGES";

```

It would be great if Jubba could help me out if he/she is available!

Many thanks,

- Joe
