#10219 closed bug (invalid)
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/
Change History (3)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Component: | unfiled → core |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
Thank you anonymous. http://jsfiddle.net/timmywil/yNrX8/1/
comment:3 Changed 12 years ago by
It is a jQuery bug(I spent some hours until I found the problem) Please change xml.async = "false"; to xml.async = false;
Note: See
TracTickets for help on using
tickets.
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>