habagrande
10-27-2005, 07:11 PM
Hi everyone... I have a question for you guys. I'd like to have a "Featuring..." section using an XML page to hold the 'features', and I'd like to use ASP to randomly pick one node to display. This is what the XML looks like:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<featuring>
<feature>
<title>Research Report</title>
<image>/img/steps.jpg</image>
<alt>When Parents Separate</alt>
<link>/en/reports/index.html</link>
<summary>When Parents Separate</summary>
</feature>
<feature>
<title>Family</title>
<image>/img/pen_book.jpg</image>
<alt>Child-centred Families</alt>
<link>/en/blah/index.html</link>
<summary>Child-centred Families summary goes here</summary>
</feature>
</featuring>
There could be only 1 'feature' or there could be 15 or 20. I can't for the life of me figure out how I could randomly pick one node out of the XML to display it.
Any help would be MUCH appreciated :) ! Thanks in advance,
habagrande
<?xml version="1.0" encoding="ISO-8859-1" ?>
<featuring>
<feature>
<title>Research Report</title>
<image>/img/steps.jpg</image>
<alt>When Parents Separate</alt>
<link>/en/reports/index.html</link>
<summary>When Parents Separate</summary>
</feature>
<feature>
<title>Family</title>
<image>/img/pen_book.jpg</image>
<alt>Child-centred Families</alt>
<link>/en/blah/index.html</link>
<summary>Child-centred Families summary goes here</summary>
</feature>
</featuring>
There could be only 1 'feature' or there could be 15 or 20. I can't for the life of me figure out how I could randomly pick one node out of the XML to display it.
Any help would be MUCH appreciated :) ! Thanks in advance,
habagrande