XPath -
What is the difference between (//first//*)[1]
and //first//*[1]
?
How it works?
A sample XML file is:
<root>
<first>
<second>
Test
</second>
<second>
<third>Test2</third>
</second>
</first>
</root>
(//first//*)[1] gives:
<second>
Test
</second>
but //first//*[1] gives:
<second>
Test
</second>
<third>Test2</third>