A->b->c might exist but c might not exist. How do I check it?
A->b->c
c
Method xpath returns array of matched elements or false
if(false !== $A->xpath('b/c')) { ...
http://www.php.net/manual/ru/simplexmlelement.xpath.php