Hi all,
I have been using ASP for quite some time but I am new to XML.
I have been batteling to get ASP to recognise some data in XML
My XML File called bookings.xml looks like a follows:-
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<year2004>
<month id="m1">
<booked>booked 1</booked>
<provbooked>provbooked 1</provbooked>
</month>
<month id="m2">
<booked>booked 2</booked>
<provbooked>provbooked 2</provbooked>
</month>
<month id="m3">
<booked>booked 3</booked>
<provbooked>provbooked 3</provbooked>
</month>
.
.
.
</year2004>
The XML file will hold 12 sets of similar information but will be identified by its own id tag m1, m2, m3 ... etc.
The ASP File which calls the XML data is shown below:-
Code:
<xml src="bookings.xml" id="m1" async="false">
</xml>
<br />Title:
<span datasrc="#m1" datafld="booked"></span>
<br />Artist:
<span datasrc="#m1" datafld="provbooked"></span>
<br />Title:
<span datasrc="#m2" datafld="booked"></span>
<br />Artist:
<span datasrc="#m2" datafld="provbooked"></span>
<br />Title:
<span datasrc="#m3" datafld="booked"></span>
<br />Artist:
<span datasrc="#m3" datafld="provbooked"></span>
The asp page only captures the first child of data from the XML file even though I have changed its sourcing <xml src="bookings.xml" id="m1" async="false"> to other id field childs.
I want to be able to call either a single childs data or a collection of childs data.
What am I doing wrong? Is there a better way of doing this?
Please can you help.
Thanks
Graham
Use you brain, not your brawn!