PHP DOM Inspector
Posted: Sat Sep 29, 2007 12:13 pm
Hi all,
Im doing some coding where I'm loading an HTML document into a DOM as follows:
$dom = new DOMDocument();
$dom->loadHTMLFile($source);
However its difficult to parse the created $dom because I dont have an idea of its structure, especially with HTML documents that are not well-formed.
Is there example code/program that will display the DOM generated (similar to the Firefox DOM inspector), so I know what kind of structure has been created?
Thanks
Im doing some coding where I'm loading an HTML document into a DOM as follows:
$dom = new DOMDocument();
$dom->loadHTMLFile($source);
However its difficult to parse the created $dom because I dont have an idea of its structure, especially with HTML documents that are not well-formed.
Is there example code/program that will display the DOM generated (similar to the Firefox DOM inspector), so I know what kind of structure has been created?
Thanks