I've tried something like this :
func traverse($xpath)
msgbox(4096,"",$xpath)
$nodesArray=_XMLGetChildNodes($xpath)
if (IsArray($nodesArray) ) Then
if Not($nodesArray[0]==0) Then
for $i=1 to $nodesArray[0]
$index=1
for $j=1 to $i-1
if $nodesArray[$i]==$nodesArray[$j] Then $index=$index+1
Next
;msgbox(4096,"",$i)
;msgbox(4096,"",$xpath & "/" & $nodesArray[$i] & "[" & $index & "]")
;msgbox(4096,"",_XMLGetPath($xpath &"/"&$nodesArray[$i]))
$areNodes=_XMLGetChildNodes($xpath & "/" & $nodesArray[$i])
if not($areNodes[0]==0) Then
traverse($xpath & "/" & $nodesArray[$i] & "[" & $index & "]")
EndIf
Next;for $i=1 to $nodesArray[0]
EndIf;if Not($nodesArray[0]==0) Then
EndIf;if (IsArray($nodesArray) ) Then
EndFunc
but I have this error:
Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
if $nodesArray[$i]==$nodesArray[$j] Then $index=$index+1
if ^ ERROR