This XPath is specific to the code snippet you’ve provided. To select <child> with id as #grand you can write //child[@id='#grand'].
To get age //child[@id='#grand']/@age.
This XPath is specific to the code snippet you’ve provided. To select <child> with id as #grand you can write //child[@id='#grand'].
To get age //child[@id='#grand']/@age.