如何在sencha touch mobile中解析下面提到的本地xml文件
As i am new to Sencha touch mobile stuck in parsing a normal xml file and pass it to a store object and populate in a panel view. Can any one help me out how to parse a XML file kept locally in the project(as mentioned below data.xml) or as a string. Below is the XML and thanks in advance.
data.XML:-
<dataSrc>
<section>
<elem>
<id>1677</id>
<name>
<![CDATA[ United Kingdom]]>
</name>
</elem>
</section>
<section>
<elem>
<id>1678</id>
<name>
<![CDATA[ United Arab Emirates]]>
</name>
</elem>
</section>
.......
</dataSrc>
As i am new to Sencha touch mobile stuck in parsing a normal xml file and pass it to a store object and populate in a panel view. Can any one help me out how to parse a XML file kept locally in the project(as mentioned below data.xml) or as a string. Below is the XML and thanks in advance.
data.XML:-
<dataSrc>
<section>
<elem>
<id>1677</id>
<name>
<![CDATA[ United Kingdom]]>
</name>
</elem>
</section>
<section>
<elem>
<id>1678</id>
<name>
<![CDATA[ United Arab Emirates]]>
</name>
</elem>
</section>
.......
</dataSrc>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
拥有一个具有 xml 属性的模型和一个具有 xml 代理的商店。
然后您就可以在商店中解析 xml 的内容。请访问 http://dev.sencha.com 阅读所有相关内容/deploy/touch/docs/?class=Ext.data.Store
Have a model with the xml properties and a store with a xml proxy.
Then you have the contents of the xml parsed in the store. Read all about this at http://dev.sencha.com/deploy/touch/docs/?class=Ext.data.Store