XML DOM - Traversing thru the Tree

wxdqz

New Member
Hi All,I built XML file that represents number of floors in a building.Each floor has many suites.Each suite has name & number.I need to build ASP page that reads my file and for each floor displays suiteswith name and numbers.I am doing this:Set floorsDoc=Server.CreateObject("Msxml2.DOMDocument")floorsDoc.async=FalsefloorsDoc.load(Server.MapPath("floors.xml"))Set floorElement=floorsDoc.documentElementResponse.Write "<b>This is XML DOM Demo</b>" & "<BR>"For Each childElement In floorElement.childNodes Response.Write childElement.text& "<br>"NextWell, I know that I am wrong. Could someone pls. refer me to a sample code?Thanks!Maya
 
Back
Top