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: |
Description
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); alert($xml.find('summary').text());
See jsfiddle here: http://jsfiddle.net/yNrX8/
Attachments (0)
Change History (3)
Changed September 07, 2011 04:38PM UTC by comment:1
Changed September 07, 2011 05:49PM UTC by comment:2
component: | unfiled → core |
---|---|
priority: | undecided → low |
resolution: | → invalid |
status: | new → closed |
Thank you anonymous. http://jsfiddle.net/timmywil/yNrX8/1/
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;
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>