Re: Developer Question [DOMDocument]

From: Date: Mon, 05 Oct 2009 10:14:23 +0000
Subject: Re: Developer Question [DOMDocument]
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-298588@lists.php.net to get a copy of this message
Michael A. Peters wrote:
Ashley Sheridan wrote:
I've not had a look at DOMDocument myself, having only used DomDocument before (there's a slight difference in the capitalisation of the 2nd and 3rd letters which made it a pain in the proverbial to work with at first!) but I would assume that if it might offer a method by which you could specify certain self closing tags. This would be necessary at least internally, to differentiate between things like <param/> which can be self closing and <script> which can't (even though the latter might only be referencing an external .js file and have no inline code!)
saveXML() does self close a script tag with no children. self closing script is only a problem if sent as html, it works when sent with application/xml+xhtml mime type. But you're right, saveHTML() does not do self closing nor </script>.
Doh! I was thing meta, script does self close as saveXML() w/ no children but does do </script> with saveHTML().

« previous php.general (#298588) next »