Re: [PHP-XML-DEV] Divergence from DOM standard
[email protected] (Rob Richards) Wed, 10 May 2006 06:28:57 -0400
| Newsgroups | php.xml.dev |
|---|---|
| Message-ID | <[email protected]> |
Jirka Kosek wrote: > Rob Richards wrote: > >> The only difference here is working with a DOMElement. Per specs it >> should return NULL but for convenience it returns all text content of >> all descendants. > > Why such divergence, when there is textContent which can be used for > such task? > > DOM is not very good XML tree based API, but it is standard so things > which you learn in Java DOM or other languages DOM, should behave in > same way on different platforms. It was a decision that was made during development of the extension. If you feel strongly about it submit a feature request for a change and I'll talk to some of the other xml devs about their thoughts on this. Any change would not be made before PHP 6 due to the BC issue a change like this would cause. Rob