Xpath question

Howdy all,

In the following XML I’m trying to retrieve /ads/rotator/ad node that doesnt have ‘US’ in a “restricted” node.


<?xml version="1.0" encoding="utf-8" ?>
    <ads>
      <rotator appId="IframeRotatingAd">                  
        <ad weight="1" isControl="false" src="">
          <text>##AD0##</text>
          <restricted />
        </ad>
        <ad weight="1" isControl="false" src="">
          <text>##AD1##</text>
          <restricted>US</restricted>
          <restricted>MX</restricted>
        </ad>
      </rotator>
    </ads>

I’ve been trying to use the xpath:

/ads/rotator[@appId='IframeRotatingAd']/ad[restricted!='US']/text

But alas, as you can see here: http://www.xmlme.com/XpathTool.aspx I keep getting it despite my efforts. If i get rid of the


<restricted>MX</restricted>

in the 2nd “ad” node it works, but I need to be able to restrict other countries.

If anyone knows a better way to go about this, please … let me in on it.