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

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



Reply via email to