Ein Teil meiner xml-Datei:XPath rekursive
<table>
<row id="aant">
<radio id="radaant">
<omschrijving>test radio</omschrijving>
<omschrijving>part 2</omschrijving>
<table>
<row id="testrow">
<radio id="testrad">
<omschrijving>test radio deeper</omschrijving>
<table/>
</radio>
</row>
</table>
</radio>
</row>
</table>
Ich mag das "omschrijving", um unter dem Tag Radio mit id = "radaant". Da "omschrijving" auch tiefer im Kind ist, bekomme ich immer "test radiopart 2test radio timer" als Ergebnis, aber ich will nur "test radiopart 2".
Ich bin derzeit mit XPath: ausdr = xpath.compile ("/ Tabelle/Zeile [@ id = 'aant']/Radio [@ id = 'radaant']/omschrijving")
Wie Kann ich meine X-Pfad-Zeichenfolge ändern, um nur das "omschrijving" vom aktuellen Knoten zu erhalten?
Ich kann Ihr Problem nicht reproduzieren: Ihr xpath wählt die gewünschten zwei 'omschrijving' Elemente –