Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you parse this web site

Status
Not open for further replies.

Crotalus

Programmer
Mar 27, 2002
7
US
I created this web site that produces data in an xml format. I need to know if someone accessing the site through the internet can parse this data and display it any way they want to. And if someone could do that, how would it be done.

It would help to know it is possible and then just a nudge in the right direction for what to do with it would be great.

We display all of this data in html format as well, but thought that it would be great if we presented it in xml format so people could use it however they wanted to.

Here is the web site; You have to click the large button to get to the xml code. The data changes every half hour.

Any usefull comments would be greatly appreciated.
 
Well, here is an example using xmlhttp object in ASP:

I would suggest changing all of your elements to have the same case, that lowercased risk threw me for a bit :)

The code to get the xml:
Code:
<%
Response.Buffer = True
Dim objXMLHTTP, URL

' Create an xmlhttp object:
Set objXMLHTTP = Server.CreateObject(&quot;Microsoft.XMLHTTP&quot;)

URL = &quot;[URL unfurl="true"]http://www.ahas.com/Sheppard.asp&quot;[/URL]

' Opens the connection to the remote server.
objXMLHTTP.Open &quot;GET&quot;, URL, False

' Actually Sends the request and returns the data:
objXMLHTTP.Send

Dim objXML, objXSL
Set objXML = Server.CreateObject(&quot;Microsoft.XMLDOM&quot;)
Set objXSL = Server.CreateObject(&quot;Microsoft.XMLDOM&quot;)

objXML.LoadXML objXMLHTTP.ResponseText
objXSL.async = false
objXSL.Load Server.MapPath(&quot;xmlhttp2.xsl&quot;)

Response.Write objXML.transformNode(objXSL)
%>

Obviously for the above code to work you would have to create an XSL file, but you could also loop through the children of the objXML object to display the data in each node if you wished.

-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
No more vacation for me :(

FAQ FAQ20-2863
= new Forums.Posting.General.GettingAnswers()
 
Thanks for the info Tarwn.
I will give it a try.

Ron
 
Tarwn,
Your link looks like it does just what I want it to do. I used your code and made a .asp page. Whenever I click the .asp page it just opens in the &quot;Microsoft Developement Environment&quot;? Why doesn't it open in explorer the way yours does?
 
You need to direct your browser to the address of the page, if you have't set up IIS or PWS on your machine, then you will need to do so.
Once you set up IIS(Internet Information Services) or PWS(personal webserver) you will have a directory at this location:
C:\Inetpub\ your file in this location (it is you default site) and the direct your browser to:
or

The reason the ASP page needs to be in the web directory is because your webserver needs to execute the script in order to build the html page. In fact if you open the link I provided above and take a look at the html you will notice that it is strictly html, no ASP code whatsoever.

Let me know if you need any more help, and if you do decide to use ASP there is a specific forum for it that will have useful information as well: forum333

-Tarwn Experts are only people who have realized how much they will never know about a language.
________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
 
Thanks again Tarwn. I do not have IIS on this machine. I do have it on another machine, so I will try it there. I really appreciate you taking the time to help out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top