| English | česky | Nederlands | Français | Español | По русски | >> Deutsch << | ZVON > Tutorials > XPath Tutorial |
| Intro / Suchen / ZVON |
| >> Beispiel 22 << | Vorheriges | Nächstes |
| //BBB[position() mod 2 = 0 ] |
|---|
| Wähle alle BBB Elemente aus, deren Position eine gerade Zahl ausmacht |
|
<AAA> <BBB/> <BBB/> <BBB/> <BBB/> <BBB/> <BBB/> <BBB/> <BBB/> <CCC/> <CCC/> <CCC/> </AAA> |
| Öffne das Beispiel in XLab. | Baumansicht (JPG) |
| //BBB[ position() = floor(last() div 2 + 0.5) or position() = ceiling(last() div 2 + 0.5) ] |
|---|
| Wähle das/die mittlere(n) BBB Element(e) aus |
|
<AAA> <BBB/> <BBB/> <BBB/> <BBB/> <BBB/> <BBB/> <BBB/> <BBB/> <CCC/> <CCC/> <CCC/> </AAA> |
| Öffne das Beispiel in XLab. | Baumansicht (JPG) |
| //CCC[ position() = floor(last() div 2 + 0.5) or position() = ceiling(last() div 2 + 0.5) ] |
|---|
| Wähle das/die mittlere(n) CCC Element(e) aus |
|
<AAA> <BBB/> <BBB/> <BBB/> <BBB/> <BBB/> <BBB/> <BBB/> <BBB/> <CCC/> <CCC/> <CCC/> </AAA> |
| Öffne das Beispiel in XLab. | Baumansicht (JPG) |