Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP XML
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 8th, 2006, 10:24 PM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default I cant retrieve XMl child nodes

Hello-

I can retieve the full xml document using the following code. How can I access Child nodes in the document to output as variables in the page? I have a variable called address below which shows what i am trying to do. Im stuck on the correct property syntax.

Thanks in advance!

-------------------
Code:
<%
' Start out declaring our variables.
' You are using Option Explicit aren't you?
Dim objXmlHttp
Dim strHTML

' This is the server safe version from MSXML3.
Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")


objXmlHttp.open "GET", "http://www.zillow.com/webservice/GetSearchResults.htm?zws-id=X1-ZWz1chbc4lnj0r_56tmg&address=1810+Hardy+Dr&citystatezip=95776", False

' Send it on it's merry way.
objXmlHttp.send

' Print out the request status:
Response.Write "Status: " & objXmlHttp.status & " " _
    & objXmlHttp.statusText & "<br />"

' Get the text of the response.
' This object is designed to deal with XML so it also has the
' following properties: responseBody, responseStream, and
' responseXML.  We just want the text so I use:
strHTML = objXmlHttp.responsetext
'Address = objXmlHttp.DocumentElement.SelectNodes("citystatezip")

' Trash our object now that I'm finished with it.
Set objXmlHttp = Nothing

' All that's left to do is display the HTML we just retreived.
' I do it first as plain HTML (which gets interpretted by the
' browser like any other HTML) and then as source (by HTML
' encoding it so the tags display instead of rendering)
' The <h1>s and <table>s are just for appearence.
%>
This is the called code: <%=  Address%>
<%= strHTML %>
<%= Server.HTMLEncode(strHTML) %>
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get the size of the child nodes. eruditionist XSLT 2 November 7th, 2008 11:59 AM
not able to print out the child nodes eruditionist XSLT 7 October 30th, 2008 10:33 AM
How can I display parent & child nodes if XML .... vishnu108mishra ASP.NET 2.0 Basics 0 November 17th, 2007 07:45 AM
Retrieveal of child nodes.... nathilson21 Classic ASP XML 0 May 7th, 2007 04:54 AM
counting child nodes Tomi XSLT 1 September 6th, 2006 03:26 AM



All times are GMT -4. The time now is 12:36 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.