Click to See Complete Forum and Search --> : Linking to external xml ??
Mrflashy
04-22-2004, 08:26 AM
I have a simple question. Currently on my side I have a 'members.page' now in asp. The data in the sql is based on a xml file that i have downloaded and exported. This works until the original xml file is updated again (which happens once every 24hrs) and i need to repeat the process.
The xml file is : http://www.anarchy-online.com/org/stats/d/2/name/714754/basicstats.xml
Now I tried to play around using Xhtml and using a link to that file and then use the elements in that xml file to display the data. But I didn't get it to work after much trouble, so I continued with what I knew best :)
The question is, if there is any good sites out there that can show me? I think I found one page with a very simple example, but I couldn't even get my IIS 6.0 to show that xhtml file..
So any hints on how I should go about this problem would be very much appriciated.
//MrFlashy
crh3675
04-22-2004, 10:56 AM
The data in the sql is based
Please clarify this statement.
Mrflashy
04-22-2004, 11:18 AM
that statment is somewhat take out of context..
The data in the sql is based on a xml file that i have downloaded and exported
aps needs a form of database to work, I use MS Sql server, and the data contained within the database is data that I have extracted from the before mentioned xml file..
Not that it's relevant tho as my question was how I could change / use Xhtml with link to the xml file i mentioned and use Data Islands :)
//MrFlashy
Khalid Ali
04-22-2004, 10:49 PM
just search this (xml forum) I have posted that type o solution several times in here
KarmaKills
04-30-2004, 01:00 AM
I think I understand what he's talking about. Our current site downloads shipping quotes daily from UPS and parses it into our data base which though is not SQL but a proprietary database built for our website. We have scripts to automate this so its not a big deal, but then again we have the luxury of an in-house programmer.
There are two methods of parsing XML to HTML. First, XHTML has very little to do with HTML. It is mearly states that HTML follow strict syntax simular to XML for better unilateral support across various browsers.
Method one would be to parse the xml through a script such as javascript and VBscript. I tend to go to javascript as I know it better, but you'll want to work in which ever you are more comfortable of course. You'll more then likely have to use this method if you dont want to make modifications to the actual XML document. You'll also want to take a quick look at XPath. Its not too crazy unless you have a completely nuts XML document like something generated by Excel *grumble*.
The second method is to use an XML style sheet called an XSL. You will need to modify the XML file to call for the XSL if you go this route, though I like this method alot.
A good source for both these methods is w3school.org. They offer good beginner level of XML and XSL, but you'll need a good working knowledge of some sort of script or be prepared to do a little more research to really make them shine.
Parsing using a script: http://www.w3schools.com/xml/xml_parser.asp
XPath: http://www.w3schools.com/xpath/xpath_intro.asp
Using XSL: http://www.w3schools.com/xsl/default.asp