Manual:Data:Readers:XmlReader (Legacy)
This version of our Learning Center is unmaintained.
This article may be out-of-date or contain incorrect information.
Please visit the new Sencha Learning Center for up-to-date material.
From Sencha - Learn
Ext Manual > Data > Readers >
Ext.data.XmlReader
Links
- XmlReader documentation
- Example code:
Note: in order for the browser to parse a returned XML document, the Content-Type in the HTTP response must be set to "text/xml".So when you use the xmlreader to parse some data generated by the server,you must change the content-type of the response http header.Otherwise the xmlreader will not parse it.
Here is some asp.net fragment code.
StringBuilder xml=new StringBuilder();
bu.Append("<dataset>");
bu.Append("<results>1</results>");
bu.Append("<row>");
bu.Append("<id>1</id>");
bu.Append("<name>Bill</name>");
bu.Append("<occupation>Gardener</occupation>");
bu.Append("</row>");
bu.Append("</dataset>");
this.Response.ContentType = "text/xml";//must do it
RenderText(bu.ToString());
This page was last modified on 14 April 2008, at 19:40.
This page has been accessed 12,217 times.
