I am trying to parse through some html files using DOM-XML. I have noticed that whenever you load a file using domxml_open_mem() it creates your dom tree without including any comments. I need to read through some of the comments as some of them are just inside of STYLE and SCRIPT tags. Because the comments are ignored I am losing content in both of these types of elements.
if you want an example try this:
<?
$xmlDoc = '<text><element text="blah">testing</element><yoh><!-- Comment -->testing</yoh></text>';
$domDoc = domxml_open_mem($xmlDoc);
echo $domDoc->dump_mem();
?>
if you view the source of that page then you will probably see the contents of $xmlDoc minus the comments. Does anyone know how I can get the comments included?