...

View Full Version : using XML and Javascript



TheKid
01-13-2003, 10:49 PM
hey

I got a problem trying to display a picture...

i have an xml file which contains data about a shop:-

<?xml version="1.0" encoding="ISO8859-1" ?>
<shop>
<sid>1</sid>
<name>Old Style</name>
<picture>doors.jpg</picture>
<map>blah.jpg</map>
<description> A nice coffee shop bar. </description>
<type>coffee/bar</type>
</shop>

i'm trying to use the picture element as a pointer to the image filename, doors.jpg, which exists in the same directory as the javascript.

But i cant find any way of using the data apart from to directly display on the screen as text. Can XML be used in this way? iif so how? any snippets apreciated.

cheers



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum