View Full Version : reading a remote XML file
Dammit
04-17-2003, 02:33 PM
I'm trying to read a remote XML file to my server, but I have no clue on how to do it. I've got this so far, but I'm stuck now...
<%@ Language=JavaScript %>
<%
var Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "Provider=MSDAOSP;Data Source=what goes here ? ;"
var rs = Server.CreateObject("ADODB.Recordset")
Conn.Open ( Conn.ConnectionString )
rs.Open("http://www.nationstates.net/cgi-bin/nationdata.cgi/nation=dammitland", Conn)
%>
Do you mean reading the XML-doc, or retrieving recordset from a database as an XML document ?
Dammit
04-17-2003, 03:11 PM
Just reading the document. :rolleyes:
The XML itself is generated on that server via a CGI script (http://www.nationstates.net/cgi-bin/nationdata.cgi)
thought i'd make it easy on myself :D and post a tutorial-link with all code + some extra's you'll need later on.
http://www.xmlfiles.com/articles/michael/searchxml/
hope you don't mind :)
Dammit
04-17-2003, 03:24 PM
I don't mind at all, it's usually even better to learn it yourself than to let ppl do it for ya :)
:thumbsup: Smart guy/girl :D Have fun with it. Ever considered using the XML as a data-island inside the html page? (Search for DSO, Data Source Object, Data Islands)
Dammit
04-17-2003, 03:45 PM
Never considered something like that, but my XML knowledge so far ain't exactly much. It looks cool though, so when I get this to work I'll look into it :)
Dammit
04-17-2003, 06:10 PM
Hmmmm, am I expected to create the XSL file myself ? Because the page I want to get the info out of, only offers the file generated via the CGI script...
Anyway, isn't there an easier way, all I basically wanna do is read the file (even just reading it in as text will do)
this is a summary i frequentlu used
http://www.3gwt.net/dje/xml_notes.htm
look for chapter 6
there are plent of other good tutorials on this.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.