通过子字符串匹配属性值的开头来查找节点

XML

<Galaxy>
    <name>Milky Way</name>
    <CelestialObject name="Earth" type="planet"/>
    <CelestialObject name="Sun" type="star"/>
</Galaxy>

XPATH

/Galaxy/*[starts-with(lower-case(@name),'ear')]

要么

//*[starts-with(lower-case(@name),'ear')]

OUTPUT

<CelestialObject name="Earth" type="planet" />