frankx: simpleXML und getLength()

Beitrag lesen

Hellihello

<a>
<b id='0'>
  <c>123</c>
  <c>456</c>
  <c>789</c>
</b>
<b id='1'>
  <c>ABC</c>
  <c>DEF</c>
  <c>GHI</c>
</b>
</a>

Nun will ich die Anzahl der Cs je B herausfinden. Also etwas in der Art wie:

echo count($xml->xpath("/a/b[0]/c"));

na, die anzahl fürs b mit id = 0? dann ist das "/a/b[@id=0]/c" (ungetestet)

Dank und Gruß,

frankx

--
tryin to multitain  - Globus = Planet != Welt