jQuery Invalid XML Error with parseXML

I just had the most frustrating past 2 hours. I was using $.parseXML in jQuery and for some reason I kept getting an “Invalid XML” error when I knew my XML was perfectly fine. I even went to the extent of validating it using the W3C XML online validator and I was still getting errors. Using the developer tools in IE (my client’s use IE so have to develop for it) I changed from using IE8 document mode to IE9 document mode and it started working! Problem is this function should still work in IE8!

After much frustration I thought “stuff it I’ll manually create the Microsoft ActiveX XML object” and then started to get an issue about not being able to create the automation object. It’s at this point my jaw dropped and I realised I must’ve turned off the Microsoft XML DOM Document add-on. Sure enough I go check it and it’s turned off.

If anyone else has stupidly made this mistake, I hope you come across this post before spending a frustrating hour or so to only realise its a massive PEBCAK (Problem Exists Between Chair And Keyboard) issue.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s