I need to print arbitrary SimpleXML objects in a specific manner, with special handling of attribute nodes.
The problem is that SimpleXML elements and attri
Using what palako pointed out, a function like this might work:
function is_attribute($node) { return !($node->asXML()[0] == "<") }