valid node count

Post Reply
abonsey
Member
Posts: 142
Joined: Fri May 24, 2013 5:10 pm

valid node count

Post by abonsey »

Hi All,
I have some XML data and I need the Switch flow to decide what is the next step based on the number of nodes populated. In the extract below only 2 section nodes are valid but it could be up to 4.
My question is how I get Switch to see how many nodes are populated?

<sections>
<year>XXXX</year>
<level>XX</level>
<version></version>
<section>1</section>
<section>2</section>
<section></section>
<section></section>
</sections>

TIA
Andrew
r.zegwaard
Member
Posts: 93
Joined: Fri Jul 08, 2011 10:31 am
Location: The Netherlands

Re: valid node count

Post by r.zegwaard »

A xpath-expression like: count(//section) should do it...
(didn't test it)
Post Reply