this is my first question on stack overflow, I hope you guys can help me.
here is my xml
<?xml version="1.0"?>
<RecentPhotoUploads>
<PHOTO><SOURCE>6171.jpg</SOURCE></PHOTO>
<PHOTO><SOURCE>6173.jpg</SOURCE></PHOTO>
<PHOTO><SOURCE>6895.jpg</SOURCE></PHOTO>
<PHOTO><SOURCE>Tulips.jpg</SOURCE></PHOTO>
</RecentPhotoUploads>
here is my javascript code
var xml=loadXMLDoc("../upload.xml");
var source="/RecentPhotoUploads/PHOTO/SOURCE"
var nodes=xml.evaluate(source, xml, null, XPathResult.ANY_TYPE, null);
var result=nodes.iterateNext();
while (result)
{
document.write("<h2>" + result.childNodes[0].nodeValue + "</h2>");
document.write("<a href='../pics/" + result.childNodes[0].nodeValue + "</a>");
result=nodes.iterateNext();
}
How would I loop through this xpathresult backwards?