Consider the following XML:
<root>
<steps>
<step>1</step>
<step>2</step>
<step>3</step>
<step>4</step>
</steps>
<stepDetails step="1">Details</stepDetails>
<stepDetails step="2">Details</stepDetails>
<stepDetails step="3">Details</stepDetails>
</root>
What I need to do is find all the steps that do not have corresponding stepDetails. In the above example, only the “<step>4</step>” node would be returned.
Now, I know I can do that by querying all the steps, iterating through the collection and performing another query for each iteration. I’m hoping that there is a way of doing that with just one query. Perhaps using something like SQL’s IN statement and a sub-query.
Any ideas or tips would be most appreciated.
thnx,
Christoph
Try this: