5 Replies Latest reply on Nov 26, 2008 5:32 AM by Denesh Kumar

    XML Syntax for filtering descendants by attribute

    WayneAtCrd
      I'm puzzled by XML syntax for getting the descendants of an XML node.
      My goal is to get all descendants (not just immediate children) whose "nesting" attribute has a specified value.
      I wrote:

      var myXML: XML = [some initial value...];
      var i:String = "hello";
      var theDesiredNodes : XMLList = myXML .. ( @nesting == i );

      but the compiler doesn't like this and is telling me that it expects a doublecolon before semicolon.

      What's the correct syntax for expressing this concept?

      (What is a doublecolon anyway?)

      Thank you