1 Reply Latest reply on Feb 10, 2010 9:38 PM by BinaryParasite

    finding xml nodes that have a specific attribute

    cmate2

      From some xml I want to find items that have a specific attribute and value.

      Here is example xml:

      <node>
      <node>
      <node>
      <special NAME="thisone"></special>
      </node>
      <node>
      </node>
      </node>
      </node>

      nodes can contain nodes...

      I need to find the special item because it has an attribute named "NAME" and value of "thisone".

      then I need its parent (node).

      I tried this:

      specialItems = tempXML.*.(hasOwnProperty("NAME"));

      but didnt seem to do anything.

      ??

      Thanks!