查找具有特定属性值的节点
XML
<Galaxy>
<name>Milky Way</name>
<CelestialObject name="Earth" type="planet"/>
<CelestialObject name="Sun" type="star"/>
</Galaxy>
XPATH
/Galaxy/*[@name='Sun']
要么
//*[@name='Sun']
OUTPUT
<CelestialObject name="Sun" type="star" />