Re: SimpleXML and Default Cast To String
| From: | Shane Caraveo | Date: | Tue, 13 Jan 2004 06:44:55 +0000 |
| Subject: | Re: SimpleXML and Default Cast To String | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7043@lists.php.net to get a copy of this message | ||
I haven't read this whole huge thread, but I agree with Sterling in this
aspect. If the problem of children and attributes can be addressed
without functions, it should be done that way. DOM is not that overly complex or with much overhead in the way it's been implemented. If people need full capabilities, they should use DOM. But children, text nodes and attributes must work correctly also.
Shane
SimpleXML is *not* supposed to reinvent DOM. It is supposed to be a data structure view of XML that can easily be integrated with other future components (such as XmlReader and XmlWriter API's). I can accept getChildren() and getAttributes() (or better, just children() and attributes()) as methods on objects, but I'm not happy with them at all. These two methods were considered for inclusion in my original thoughts on simplexml, and I decided against them for the reasons I've mentioned above. Anyhow, shall we put it to a vote on these two methods and move on? I'm -1 on having them. -Sterling