Using XPath, I want to get those comments which are the first children of item
elements, before any other element children.
I have XML like this:
<list>
...
<item id="52">
<!-- this is optional comment, need get this -->
<randomParam>asd</randomParam> <!-- not this comment -->
<anotherRandomParam type="3" />
<paramText /> <!-- not this comment -->
...
</item>
<item id="53">
<param1>test</param1> <!-- not need this comment -->
<param2 title="text">text</param2>
<someParam>
<!-- not need this comment -->
<test />
<test />
<test />
</someParam>
...
</item>
...
</list>