Brian,
Because the XML will be constantly changing in terms of the number of ProductsItem nodes and corresponding child Identifier nodes, I want to be able to select as many ProductsItem nodes as possible without exceeding a maximum count of three Identifier nodes in the selected ProductsItem nodes. Wheew ...
Here is another example ... If I have ...
<Products>
<ProductsItem>
<Identifiers>
<Identifier>
<Type>ECCN Nbr</Type>
<Value>43512</Value>
</Identifier>
</Identifiers>
</ProductsItem>
<ProductsItem>
<Identifiers>
<Identifier>
<Type>ECCN Nbr</Type>
<Value>54321</Value>
</Identifier>
</Identifiers>
</ProductsItem>
<ProductsItem>
<Identifiers>
<Identifier>
<Type>ECCN Nbr</Type>
<Value>12112</Value>
</Identifier>
</Identifiers>
</ProductsItem>
<ProductsItem>
<Identifiers>
<Identifier>
<Type>ECCN Nbr</Type>
<Value>21213</Value>
</Identifier>
<Identifier>
<Type>ECCN Nbr</Type>
<Value>21334</Value>
</Identifier>
<Identifier>
<Type>ECCN Nbr</Type>
<Value>21456</Value>
</Identifier>
</Identifiers>
</ProductsItem>
</Products>
I only want the first three ProductsItem nodes because the total count of Identifier nodes in the first three ProductsItem nodes is equal to 3 which is less than four. Then, I would wan the next (4th postion) ProductsItem node by itself because it has a total of three Identifier nodes which is less than four.
Thanks for the quick response,
Ben
|