Bonjour à tous,
Pour récupérer des attributs d'une ligne de mon fichier XML, j'utilise :
Ca fonctionne très bien, mais je n'arrive pas à récupérer ceux de la ligne suivante, sachant que la lecture se fait comme suit :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 ... WLig = "rows='" + $(this).find('ELEMENT').attr('LIG') + "' "; WCol = "cols='" + $(this).find('ELEMENT').attr('COL') + "' "; ...
Les attributs ne sont disponibles que si "WElement1" ou "WElement2" sont égaux à "TEXTAREA"
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 ... var WNomChamp1 = $(this).find('NAME').text(); var WNomChamp2 = $(this).next('ZONE_SAISIE').find('NAME').text(); var WLib1 = $(this).find('LIB').text(); var WLib2 = $(this).next('ZONE_SAISIE').find('LIB').text(); var WElement1 = $(this).find('ELEMENT').text(); var WElement2 = $(this).next('ZONE_SAISIE').find('ELEMENT').text(); ...
Bref, comment faire ?
Merci d'avance pour votre aide.
Partager