OK, this is an ASP question despite the title.
I am trying to check whether an element exists in an XML page.
I can do it in other languages but i need to use asp for the site i am working on.
Having used an XQL query to return a set of elements I now want to get the attribute of an element which is not always present in the supplied (3rd party) XML.
but this gives the error
Object doesn't support this property or method: 'getAttribute'
which was the same as when i just tried to access the atrribute without checking for the element first.
Any help, please?
JEz
I am trying to check whether an element exists in an XML page.
I can do it in other languages but i need to use asp for the site i am working on.
Having used an XQL query to return a set of elements I now want to get the attribute of an element which is not always present in the supplied (3rd party) XML.
Code:
if isNull(horse.selectNodes("LastRunDays"))=false then
response.write horse.selectNodes("LastRunDays").getAttribute("days")
else response.write "error"
end if
but this gives the error
Object doesn't support this property or method: 'getAttribute'
which was the same as when i just tried to access the atrribute without checking for the element first.
Any help, please?
JEz