Hello Rob,

Sunday, March 5, 2006, 3:29:05 PM, you wrote:

> I would like to propose adding addChild and addAtribute methods to 
> simplexml. I know these have been shot down in the past, but with 
> Marcus' recent changes to simplexml, they now make sense imo.

It is important to note that we shot down those in the past because
we hadn't had the support by the generic handlers either. Just becuase
they weren't working as expected and nobody was willing to do it and
partly becuase we believed it impossible. Though now i fixed all
issues it makes sense. What still stands is that originally - in its
first days - the goal of SimpleXML was to not have any function at all.
But that was before we discoverd that this design does not allow to
handle namespaces at all and leaded to unexpected behavior when SXE
was used ofr documents that contained namespaces.

> SimpleXMLElement::addChild(string qName, string value [,string ns])
> SimpleXMLElement::addAttribute(string qName, string value [,string ns])

> http://www.ctindustries.net/patches/sxe.diff.txt

The patch looks good.

> To the argument that DOM could just be used to provide the
> functionality, the same cause could be made for the getName, 
> getNamespaces and  getDocNamespaces methods as well and these new 
> functions are much more useful imo.

I hate DOM for its endless complexity and very much dislike having
to switch between the two.

Best regards,
 Marcus

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

Reply via email to