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.

1 comment: