<% Option Explicit Response.Buffer = True Dim xmlDoc Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM") xmlDoc.async = False xmlDoc.load Server.MapPath("faqdata.xml") Dim title, heading, paragraph, testHTML, testVar, msg, x, y, z, zz, Node, Node2 Dim test3 Set x = xmlDoc.getElementsByTagName("anomalie") ' Obtenir les tags "anomalie" dans un genre d'array %> <%= title %>

FAQ Informatique SUNNIKAN Consulting

<% For Each y In x ' Pour chaque tag "anomalie"%> <% Response.Write("

") Response.Write("[" & y.getAttribute("ref")& "] " & y.selectSingleNode("titre").text & "

") Response.Write("
") Response.Write("

Symptomes

") Response.Write("

Causes

") Response.Write("

Solutions

") Set z = y.selectNodes("solution") For Each Node In z Response.Write("

" & node.selectSingleNode("titre").text & "

    ") Set zz = node.selectNodes("etape") For Each Node2 In zz Response.Write("
  1. " & Node2.text & "
  2. ") Next Response.Write("
") Next Response.Write("

Notes

") Set z = y.selectNodes("note") For Each Node In z Response.Write("

" & node.text & "

") Next Response.Write("

Liens

") Response.Write("
") %> <%Next%> <% If xmlDoc.parseError.errorCode <> 0 Then ' Partie ici qui vérifie que ton XML est correct! msg = "Error loading INTERPRETER data file." msg = msg & "
Description: " & xmlDoc.parseError.reason & "
" msg = msg & "
Source text: " & xmlDoc.parseError.srcText & "
" Response.Write msg End If %>

_____