Getting a node value without having to match it? Of course !: 3
class SimplerXMLElement extends SimpleXMLElement { public function getValue() { return (string) $this; } }
Now you need to use the second parameter simplexml_load_string() to get even simpler XML elements!
More seriously, although node is node. If you need to use the value of node as a string, an integer and what is not, it will include the identity at some point, regardless of whether you do it personally or not.
source share