Skip to main content

Bug Tracker

Side navigation

#4266 closed bug (invalid)

Opened February 27, 2009 01:32PM UTC

Closed February 28, 2009 04:27AM UTC

title tag ignored in xml

Reported by: surangini Owned by:
Priority: major Milestone: 1.3.2
Component: core Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

If an xml has a title tag, jquery ignores it while navigating through it.

var val = '<values><title>some title value</title><rightscode>G</rightscode><rights>Rights value</rights></values>';

//val is an example else its a valid xml.

$.each($(val).children(), function(){

alert('ret: ' + $(this).text() + ' node: ' + this.tagName );

});

Everything get's printed well except title tag. No matter where title tag exists in the xml.

Attachments (0)
Change History (1)

Changed February 28, 2009 04:27AM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed
$(htmlstring)
parses html using the browser's html parser. jQuery cannot determine that the string you gave is xml. If you parse a string with an xml parser you can pass that to
$()
and jQuery can process it.

http://docs.jquery.com/Core/jQuery#htmlownerDocument

http://markmail.org/message/i2kytvrcn7cvdegn