View Full Version : YQL - reformat xml string into dataStore

28 Oct 2010, 2:22 AM

Newbie and trying to learn js and extjs concepts etc so might appear a bit dumb !

I'm trying to see if i can integrate with Reporting Services reports. Working with the ExtJS example and docs i've got a simple page (here (http://www.guidelineweb.co.uk/report3.html)) that will access the report via YQL and it returns the report but i need to extract the data and try and get it into a regModel and data.Store so i can plug it into the Ext.ux.TouchGridPanel. It's returning the XML as a string, with "???" at the beginning which i've stripped out - line 48 in report3.js. Can anybody give me some pointers as to how i can now parse that into a data.Store ?

based on the following regModel...

Ext.regModel("TestModel", {
fields : [

and here's the string xml that's returned, i've reformatted it a bit to make it readable...

<?xml version="1.0" encoding="utf-8"?>
<Report p1:schemaLocation="iCalloutSite http://localhost/ReportServer$SQL2005?%2fGemsReports%2fGems%2fiCalloutSite&amp;rs%3aFormat=XML&amp;rs%3aShowHideToggle%3aisnull=True&amp;rs%3aSnapshot%3aisnull=True&amp;rc%3aSchema=True" Name="iCalloutSite" xmlns:p1="http://www.w3.org/2001/XMLSchema-instance" xmlns="iCalloutSite">
<Detail ID="37126" LiftShortName="EPL3 CL121" DateTimeReported="2010-10-02T16:34:00" ReportedFault="lift 3 trapping " />
<Detail ID="36435" LiftShortName="EPL4 CL122" DateTimeReported="2010-09-09T10:41:00" ReportedFault="lift 4 on podium - lights gone " />
<Detail ID="35416" LiftShortName="EPL3 CL121" DateTimeReported="2010-08-04T09:43:00" ReportedFault="Fit light fitting - lift 3" />
<Detail ID="35371" LiftShortName="EPL3 CL121" DateTimeReported="2010-08-03T08:11:00" ReportedFault="Lights out on lifts 3 &amp; 4 - need to be changed " />