Eli wrote:
Hi,

<ns:root i="0">
    <tag>
        <ns:node i="1"/>
    </tag>
    <ns:anothernode i="2">
        <ns:notme i="3">
            <ns:meneither i="4"/>
        </ns:notme>
        <anothertag/>
    </ns:anothernode>
</ns:root>

I need to retrieve a list of all the INNER <ns:*> nodes (not the root i=0 node), that do not have an ancestor of any <ns:*> node but the root <ns:root i="0"> node.
In other words: get all <ns:*> nodes with i in {1,2}.


Solved. :-)

$XPathQuery = /*//ns:*[not(ancestor::ns:*[ancestor::ns:*])]

-thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to