Re: Developer Question [DOMDocument]

From: Date: Mon, 05 Oct 2009 10:08:24 +0000
Subject: Re: Developer Question [DOMDocument]
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-298587@lists.php.net to get a copy of this message
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>.
If not, then I'd do a file find on the code for any files containing the text 'param' for example, to see if that leads you to the right place.
I tried that on libxml2 source - grep -R "param" didn't work so well, a bazillion files with that use the phrase "param".
You may have problems doing this on a Windows XP system,
I'm on linux. I'll find it eventually. Probably just before upstream does an official html5 patch ;)

« previous php.general (#298587) next »