Thursday, June 6, 2013

JQuery XML find method problem - Webkit and chrome fix




If you have xml element tag like this <gml:featureMember>, then jQuery(xml).find("gml\\:featureMember").each(function(){}); will not work across all the browsers, it works in IE and firefox.


To fix it, use as below

$(xml).find("gml\\:featureMember,featureMember").each(function() {
// Do stuff
});
 
 

This works across all the browser.
 

2 comments:

  1. Thank you so much Bijay, you saved the day!

    ReplyDelete
  2. The article was up to the point and described the information very effectively. Thanks to blog author for wonderful and informative post.
    website development

    ReplyDelete