Bug Tracker

Opened 14 years ago

Closed 12 years ago

Last modified 12 years ago

#3404 closed enhancement (duplicate)

a suggestion to workaround XML namespace selector problem

Reported by: sglai Owned by:
Priority: major Milestone: 1.3
Component: selector Version: 1.2.6
Keywords: find Cc:
Blocked by: Blocking:


To workaround xml namespace selector problem. May I suggest to handle xml document selector separately and put the browsers specific code in it. Code goes like this(tested with FF2 and FF3 and IE6):

find: function(t, context){


if (jQuery.isXMLDoc(elem)){ handle xml document here

var quickNStag = new RegExp("(#.?)([


re2 = quickNStag;

m = re2.exec(t); m[0] = full name, m[1] = "." or "#", m[2] = namespace, m[3] = tagname

base on browser takes full name or just tag name

var tag = parseFloat(jQuery.browser.version) < 1.9 ? m[3] : m[0];

pass it to getElementsByTagName(tag)



Change History (3)

comment:1 Changed 14 years ago by sglai

ok, I know we need a better RegExp to handle xml that has no namespace.

comment:2 Changed 12 years ago by dmethvin

Resolution: duplicate
Status: newclosed

comment:3 Changed 12 years ago by dmethvin

Duplicate of #1826.

Note: See TracTickets for help on using tickets.