ASP and XML

Reply

Join Date: Sep 2007
Posts: 15
Reputation: moiseszaragoza is an unknown quantity at this point 
Solved Threads: 0
moiseszaragoza moiseszaragoza is offline Offline
Newbie Poster

ASP and XML

 
0
  #1
Sep 26th, 2007
I have been trying to get the child nodes out of a XML doc.

so far what i have is


  1. <%
  2.  
  3. '
  4. ' Create new XML reader object
  5. Dim xmlDoc
  6. Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
  7. ' Load the specified XML file (returns XML output)
  8. xmlDoc.load("http://xmlPath")
  9.  
  10. ' Parse XML
  11. if xmlDoc.parseError.errorcode <> 0 then
  12. ' oops error in xml
  13. Response.Write("XML Error...<br>")
  14. Response.write("<br>Error Code: ")
  15. Response.write(xmlDoc.parseError.errorCode)
  16. Response.write("<br>Error Reason: ")
  17. Response.write(xmlDoc.parseError.reason)
  18. Response.write("<br>Error Line: ")
  19. Response.write(xmlDoc.parseError.line)
  20. else
  21. ' get xml data
  22.  
  23.  
  24.  
  25. Set ElemList = xmlDoc.getElementsByTagName("page ")
  26. For i=0 To (ElemList.length -1)
  27. MsgBox ElemList.item(i).xml
  28. Next
  29.  
  30.  
  31. end if
  32.  
  33.  
  34. /xmlParseContent.asp
  35. %>


one of my child nodes is

<page ishidden="true" pagename="Home" index="0" id="1">
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for ASP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC