I have just started learning XPath and I am learning the language without the abbreviation first.
When a location path starts with the character '/' the initial context node is forces to be the root node...
Sample xml from book:
<widget type="gadget">
...
</widget>
If I am supposed to write the XPath so I get the type attribute why do I have to write:
/child::widget/attribute::type
and not like this /attribute::type
Have I misunderstood something about the root node or? Because I thought '/' and widget was the same...
Thank you