PDA

View Full Version : loading xml file


sir pannels
12-05-2007, 04:32 PM
Hello all,

I use the following to load an xml file...

xmlDoc=document.implementation.createDocument("","",null);
xmlDoc.load("file.xml");
xmlDoc.onload=getmessage;

How do I check if it had loaded correctly? I read something about a ready state you can call?

Many thanks
P

Whatever Jr.
12-06-2007, 07:47 AM
Try xmLDoc.parseError.Reason

HTH, Tom

sir pannels
12-06-2007, 11:02 AM
Thanks Tom, that is only available in IE though -- so I have built a custome feature using try catch :)

Thanks again