Re: SimpleXML and Default Cast To String

From: Date: Tue, 13 Jan 2004 00:01:41 +0000
Subject: Re: SimpleXML and Default Cast To String
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-7030@lists.php.net to get a copy of this message
On Mon, 12 Jan 2004, Sterling Hughes wrote: > Its XML's SQL/regular expressions, draw what analogies to string processing > that you will, but I don't see: > > $results = simplexml_query($element, '/child::node()'); > foreach ($results as $result) { > echo $result; > } > > Signifigantly more complex then: > > $results = $element->getChildren(); > foreach ($results as $result) { > echo $result; > } I do see it that way. The first one forces the user to learn a new (significantly complex) language to perform simple operations, even if it provides a more "powerful abstraction". - Andrei

« previous php.internals (#7030) next »