Bug Tracker

Opened 15 years ago

Closed 15 years ago

#4266 closed bug (invalid)

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.

Change History (1)

comment:1 Changed 15 years ago by dmethvin

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

Note: See TracTickets for help on using tickets.