XML That Is Not Well Formed
I've been working with AJAX for about a year now and something that I have not figured out yet is how to deal with xml that is not well formed. Typically, I will pass the xmlhttprequest object's responseXML to a function and if the passed xml is not well formed, a fatal error occurs and my script won't work. I have tried using try...catch to catch the error but that doesn't work. Can anyone shed some light how to test if the returned XML is well formed?
|