Re: SimpleXML and Default Cast To String

From: Date: Tue, 13 Jan 2004 04:58:02 +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-7036@lists.php.net to get a copy of this message
On 2004/01/13, at 8:05, Sterling Hughes wrote:
So is generically processing child elements. Besides, if there is one technology worth learning when it comes to processing XML its Xpath. 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 might be joking, but I wonder what it'd be like if we could do these tricks: foreach ($results['child::node()'] as $result) { echo $result; } foreach ($results['*'] as $result) { echo $result; } foreach ($results['@*'] as $result) { echo $result; } I don't think this will actually get implemented though :) Moriyoshi

« previous php.internals (#7036) next »