20 Jun 2012 10:51 PM #1
Unanswered: Read CDATA content in a XML file
Hello! I'm trying to read an XML file that looks like this:
<?xml version="1.0" encoding="UTF-8"?> <announcements> <announcement c_date="2012-06-29T08:00:00+02:00"> <title><=!=[=C=D=A=T=A=[Title 1]=]=></title> <description><=!=[=C=D=A=T=A=[Description 1]=]=></description> </announcement> </announcements>
It seems that CDATA content is not interpreted by Sencha; there is a function in Sencha for parse CDATA content and a function to read and parse attributes like c_date?
22 Jun 2012 10:19 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
I'm not XML expert (I hugely prefer JSON) but I thought CDATA was like <![CDATA[ ]]>Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
23 Jun 2012 3:32 AM #3
Yes, is <![CDATA[ ]]>. I don't know why the forum has parsed it in that way...
18 Oct 2012 12:44 PM #4
Hi...facing same issue Reading XML Error: Unexpected token <
Hi...facing same issue Reading XML Error: Unexpected token <Hi,
I'm facing same issue.
Accessing http request on cross-domain, and that why using proxy type as jsonp.
With this I'm getting error as follows.
Reading XML Error: Unexpected token<my Store:
Please note that, XML repsonse from server does contain data with CDATA tag
Not sure, error I get is due to a limitation on reader type "xml"
Please help ...you may like to reach me at firstname.lastname@example.org
Thanks in advance...