Bonjour,

je cherche, avec xmlstarlet, à récupérer les données après un nœud dont l'attribut correspond à une expression, mais plus haut dans la hiérarchie.

j'ai du mal à expliquer, alors je vous montre

schématiquement :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
/root/
/root/tag1/
/root/tag1/tag2/
/root/tag1/tag2/tag3[@attribute="bla bla"]
/root/tag1/tag2/un/autre/ici
/root/tag1/tag2/un/autre/ici
/root/tag1/tag2/un/autre/ici
/root/tag1/tag2/tag3[@attribute="autre chose"]
/root/tag1/tag2/un/autre/pasIci
/root/tag1/tag2/un/autre/pasIci
/root/tag1/tag2/un/autre/pasIci
je voudrais récupérer les données après bla bla, jusqu'à autre chose exclu.

le fichier html est disponible ici, et je cherche à récupérer la liste des serveurs français (html/body/div/div/div/h5/span[@class='fam-flag fam-flag-fr' and @title='France'])