Find genus, then species
//genus[species/@name='Lama guanicoe']/species
Find species with parent genus
//species[parent::genus/species/@name = 'Lama guanicoe']
Find siblings, and self
//species[@name = 'Lama guanicoe']/preceding-sibling::species
/taxonomy//species[@name = 'Lama guanicoe']
/taxonomy//species[@name = 'Lama guanicoe']/following-sibling::species
Approach: select only those parts of the tree that have the species as a descendant
/taxonomy//*[descendant-or-self::species/@name='Giraffa cameloparadalis']
To retain the hierarchy, we'll need to use XSLT with XPath!