PHP: XML Nodes help functions