1--TEST-- 2DOMDocument::saveHTML() vs DOMDocumet::saveXML() 3--SKIPIF-- 4<?php 5require_once dirname(__FILE__) .'/skipif.inc'; 6?> 7--FILE-- 8<?php 9$d = new DOMDocument(); 10$str = <<<EOD 11<html> 12<head> 13</head> 14<body> 15<p>Hi.<br/>there</p> 16</body> 17</html> 18EOD; 19$d->loadHTML($str); 20$e = $d->getElementsByTagName("p"); 21$e = $e->item(0); 22echo $d->saveXml($e),"\n"; 23echo $d->saveHtml($e),"\n"; 24--EXPECT-- 25<p>Hi.<br/>there</p> 26<p>Hi.<br>there</p> 27