Page 1 of 1

Vaid node count

Posted: Mon Sep 03, 2018 11:37 pm
by abonsey
Hi All,
I asked this in the flows forum but had no response so I'm trying here and hoping for better luck!

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

Re: Vaid node count

Posted: Tue Sep 04, 2018 7:03 am
by r.zegwaard
count(//section[not(*)]/text())

This seems to work. At least in Notepad++ ;)