I am writing a task to import a XML. Debugging is a pain as both var_dump and print_r return seemingly empty objects for DOM objects like DOMElement and DOMNodeList list, looking so:
object(DOMElement)#330 (0) {}
object(DOMNodeList)#335 (0) {}
But they are not empty as I can read the values.
What debugging options have I instead?
For a
DomDocumentIvar_dumpusing the xml output.For a
DOMElement, I use (as seen here):But
DOMNodeList, I have no idea. Maybe you have to attach/append it to a DomDocument, and then var_dump it.And btw, not showing internals of a DomDocument is reported (here: Reflection).