Bonjour je cherche a faire un tableau HTML avec des donnees d'un file.xml
Je travaille en javascript
Code :
- <Study StudyNumber="3">
- <Sample>
- <Destination Position="D2"/>
- <Source SourcePlate="P3" SourcePos="A2" sourceConc=2"/>
- </Source>
- </Sample>
- <Sample>
- <Destination Position="D12"/>
- <Source SourcePlate="P5" SourcePos="C1" sourceConc=3"/>
- </Source>
- </Sample>
- <Sample>
- <Destination Position="D5"/>
- <Source SourcePlate="P7" SourcePos="B1" sourceConc=1"/>
- </Source>
- </Sample>
- </Study>
|
J' aimerai faire un tableau avec avec les 3 colonnes SourcePlate;SourcePos and SourcePos
je sais charger un file.xml
je chercha a faire
Code :
- <html>
- <body>
- <xml
- src=" sample2.xml"
- id="xmldso"
- async="false">
- </xml>
|
je ne sais pas remplir le tableau
Code :
- <table
- datasrc="#xmldso"
- width="100%"
- border="1">
- <thead>
- <th>SourcePlate</th>
- <th>SourcePos</th>
- <th>sourceConc</th>
- </thead>
- <tr align="left">
- <td><span datafld="SourcePlate""></span></td>
- <td><span datafld="SourcePos"></span></td>
- <td><span datafld="sourceConc"></span></td>
- </tr>
- </table>
- </body>
- </html>
|
je vous remercie pour vos idees