Skip to main content

Bug Tracker

Side navigation

#10219 closed bug (invalid)

Opened September 07, 2011 03:33PM UTC

Closed September 07, 2011 05:49PM UTC

Last modified October 10, 2011 12:31PM UTC

jQuery.ParseXML - Unable to retrieve element text

Reported by: anonymous Owned by:
Priority: low Milestone: None
Component: core Version: 1.6.3
Keywords: Cc:
Blocked by: Blocking:

Executing the following code does not alert the text contained within the summary element. It seems to be an issue with && occurring in the element.

var xmlDoc = $.parseXML('<?xml version="1.0"?><calculate><result>true</result><summary>true && true = true</summary></calculate>');
$xml = $(xmlDoc);


See jsfiddle here:

Attachments (0)
Change History (3)

Changed September 07, 2011 04:38PM UTC by anonymous comment:1

I don't think this is a jquery issue, op just needs to use a cdata wrapper in his xml tag

<summary><![CDATA[true && true = true]]></summary>

Changed September 07, 2011 05:49PM UTC by timmywil comment:2

component: unfiledcore
priority: undecidedlow
resolution: → invalid
status: newclosed

Changed October 10, 2011 12:31PM UTC by comment:3

It is a jQuery bug(I spent some hours until I found the problem) Please change xml.async = "false"; to xml.async = false;