944,110 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 2554
  • ASP RSS
Sep 26th, 2007
0

ASP and XML

Expand Post »
I have been trying to get the child nodes out of a XML doc.

so far what i have is


ASP Syntax (Toggle Plain Text)
  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">
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
moiseszaragoza is offline Offline
15 posts
since Sep 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: ASP electronic exam project, problem when update data base
Next Thread in ASP Forum Timeline: what is record set in ASP?n why we use it?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC