tags:

views:

171

answers:

2

I am using XSLT to convert RSS to JSON format and return the JSON to ajax calls. everything works fine but if some elements in the RSS have some double quotes, like the code below, then when I use JSON parser from http://json.org/json2.js to parse the JSON result, it would failed to parse. I have tried to set disable-output-escaping="false" and still, have the same problem.

<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"&gt;
<channel>
<title>Apple - Support - Most Recent  - MacBook</title>
<link>http://www.apple.com/support/&lt;/link&gt;
<description>"Apple" - "Support" - Most Recent - Apple Inc.</description>
....
</channel>
</rss>
A: 

i just again tried using translate($var, '&quote', '') it works :)

green_tea2009
You should accept your own answer so the question doesn't keep showing up on the unanswered list.
Jim Garrison
+1  A: 

You could try xml2json-xslt?

http://code.google.com/p/xml2json-xslt/

leekelleher