Bonjour, voici un extrait du xml que j'ai:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
<root>
   <row1>
       <attr1>value1</attr1>
       <attr2>type2</attr2>
  </row1>
  <row2>
       <attr1>value2</attr1>
       <attr2>type2</attr2>
  </row2>
  <row3>
       <attr1>value1</attr1>
       <attr2>type2</attr2>
  </row3>
  <row4>
       <attr1>value2</attr1>
       <attr2>type2</attr2>
  </row4>
</root>
Je cherche à avoir les valeurs distinctes de tous les attr1. Je souhaite avoir un tableau avec value1,value2 uniquement.
j'ai essayé ceci:
/root/row[not(attr1/text()=preceding-sibling::attr1/text())]/attr1/text()

mais ca me renvoie toutes les valeurs de l'attribut attr1

merci beaucoup pour votre aide