I'm trying to get the first child element (doesn't matter what type of element it is) of a particular element, and this is what I have:
//main[@id='main2']/*[first()]
I've also tried:
//main[@id='main2']/*[1]
Both are returning null, and I know the first child is not null, so I'm just wondering what's wrong with the expression and/or how I would go about getting the first child of the //main[@id='main2'] element. I've tried Googling for some time, but to no avail.