XML
<Galaxy>
<name>Milky Way</name>
<CelestialObject name="Earth" type="planet"/>
<CelestialObject name="Sun" type="star"/>
</Galaxy>
XPATH
/Galaxy/*[contains(@name,'Ear')]
or
//*[contains(@name,'Ear')]
Double quotes can also be used in place of single quotes:
/Galaxy/*[contains(@name, "Ear")]
OUTPUT
<CelestialObject name="Earth" type="planet" />