Solving the XML Parsing error in Firebug

XML Parsing Error: no element found Location: moz-nullprincipal:{e04285c3-86a1-f146-b683-55bb667191ea} Line Number 1, Column 1:

^

If you are getting the above error in firebug, you are most probably making a cross browser request that is not allowed. You most probably do NOT have an invalid XML in your response. Cross browser requests are not allowed, unless you use jsonp or script as the data type.

To fix this problem, make sure the url doesn’t start with a http/ https:

$.ajax({ url : "http://localhost/somewhere" })

This is not allowed, unless you follow the rules to make a cross browser request. You probably want to do something like:

$.ajax({ url : "somewhere" })

6 Comments

  1. Thank You for this. Last week I added a VirtualHost with a different port to my apache conf file, but forgot about it. I really couldn’t figure out what this error in Firebug meant, they really should fix this, no one will ever guess it’s a cross-domain issue. Also I tested in Chrome and in this case the error message was obvious.

    Reply

  2. url : “somewhere”
    my url comes like this as i mentioned above when i download a file from server. but it give the same error :- XML Parsing error

    Reply

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s