Accessing processing instructions with PHP's SimpleXML
问题 Pretty straightforward -- Is there any way to access the data of a processing instruction node using SimpleXML? I understand that SimpleXML is, well, simple; as a result it has a number of limitations, predominantly working with mixed content nodes. An example: Test.xml <test> <node> <?php /* processing instructions */ ?> </node> </test> Parse.php $test = simplexml_load_file('Test.xml'); var_dump($test->node->php); // dumps as a SimpleXMLElement, so it's sorta found, // however string casting