Create XMLList containing multiple nodesets

387 views Asked by At

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

There are 1 answers

2
Treby On

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

hope it gives you an idea