- var_dump: documentation ( source)
<?php
$xml = <<<XML
<?xml version="1.0"?>
<a>
<b>
<c>
<value>Some Value</value>
</c>
</b>
</a>
XML;
$a = new SimpleXMLElement($xml);
$node = $a->b->c->value;
if ($node) {
echo "Node";
}
foreach ($a->b->c->children() as $key => $value) {
var_dump($value);
}