Hello,
May be I should post how I found the error?
1) I commented the line that gives error.
// var nodecount=RootElement1.childNodes.length;
This is very handy technique to find which caused the error.
Usually is something before the line that gives the error.
2) Since I know that there are 4 elements in xml nodes, I hardcoded:
var nodecount = 4;
This is because I do not want to recieve another error that nodecount has no value.
You can guess some value and hard code it.
3) Then checked what the browser display - WOW - it shows an alert that Root Element is null and The data of the XML file cannot be accessed
So, so, there could be something wrong with the Root Element.
4) Let see what is in there?
var RootElement1=message.documentELement;
RootElement1 cannot be a prob
message is the id of xml island, everithing is ok there, no small/caps diffrences
5) Let's check MSDN for property documentELement
See whole reference when you have time.
I have CD version of MSDN and it is much quicker.
Let's copy their example line
var RootElement1=message.documentElement;
6) Check again:
It worked till SUBJECT, then got an error.
Time to rollback unnecessary changes, still error, check the bodydata - it appeared only 1 time - so it should be pdata.
Voala, checked, corrected and free from bugs!
Wish you success!
D.