views:

96

answers:

1

Hi All,

I have scoured the internet trying to find an answer to this...I must be asking the wrong question?!

<a>
  <b>
    <c/>
    <c/>
  </b>
  <a>
    <b>
      <c/>
    </b>
  </a>
</a>
var x:XMLList = node.a | node.b.c; <-- compiler error
var x:XMLList = node.a || node.b.c; <-- nothing and probably not correct syntax

I want a | b/c nodes returning i.e. I want an XMLList containing a's and c's but without the b's...

I am doing databinding on the xml so don't want to create a new root and add the children in two steps.

Any ideas VERY welcome!

Lewis

+1  A: 

You might need to create new xmllist with the condition that will disregard node b

hope it gives you an idea

Treby
If I use a filter and filter b's, I will not get any c's. What I'm looking to do is to populate a tree with a's and c's with b's hidden.
CobraFlow
I think Treby is saying to loop through the XML and add <c>s to <a>s as children, ignoring the <b>s. What's happening with your filter would be an expected behavior.
invertedSpear