Can I split a level of an XML document with an XPath expression into a list? I have this, for example:
<root>
<test1 />
<testX />
<test2 />
<test21 />
<testX />
<test3 />
</root>
So running it on this returns a list with <test1 />, <test2 /><test21 /> and <test3 />.
There is not necessarily just one node between <testX />, there can be a varying number.
Find the first element under root, and the first element that follows each “testX” element. Excepting those elements that are named “testX”.
Some MSDN links on XPath: