Select only nodes that have no parent with specific attribut

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
crazycoders
Forum Contributor
Posts: 260
Joined: Tue Oct 28, 2008 7:48 am
Location: Montreal, Qc, Canada

Select only nodes that have no parent with specific attribut

Post by crazycoders »

I'd like to build an xpath query for php's domxml extension that does the following:

Select all nodes that have the attribute: runat="server"
But, the node selected in this way must not be a child of another node that has a runat="server" attribute

Is this possible?
Post Reply