At 04:54 PM 1/12/2004 -0500, Sterling Hughes wrote:
> Hello Sterling,
>
> Monday, January 12, 2004, 10:33:08 PM, you wrote:
>
> >> > In theory, I like the idea of a unified set of XML helper extensions,
> >> > but DOM's so big and ugly that I don't know if it plays well with
> >> > others in the sandbox.
> >>
> >> We are not consistent! Not in any way. DOM uses studlyCaps and SimpleXML
> >> uses underscores for its method names. Speaking of consistency we should
> >> probably discuss whether we want to change all methods of SimpleXML to
> >> studlyCaps (we cannot hcnage the DOM method names). Until RC1 i guess we
> >> can do such changes if we all agree and see it to be important.
> >>
>
> > Haven't you been reading the thread - there are no more methods! :)
>
> Ignorance is bliss.
>
> It makes no sense to drop all methods. IMO that'd be absolute nonsense.
>

Why? Every one of these methods can be done with simple xpath queries:

Because it's extremely easy to use! I don't have an opinion on everyone of the methods but giving people the easy way out is great. That's how I see SimpleXML, XML for Dummies!


Andi

hasChildren()
getChildren()

==

/child::node()

attributes()

==

/attribute::*

count()

==

count(//self::node())

This is why xpath was invented, and why its there in the first place.

-Sterling

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to