Можно ли с помощью XPath получить имя каждого узла в пути к целевому узлу в виде строки?
Пример.xml
<parent>
<childOne>
<target>true</target>
</childOne>
<childTwo>
<target>true</target>
</childTwo>
<childThree>
<target>false</target>
</childThree>
</parent>
Выбирает всех предков, для которых target имеет значение true
//node()[target = "true"]/ancestor-or-self::*
Возможно ли получить этот результат
"parent/childOne/target"
"parent/childTwo/target"