0 Replies Latest reply on May 26, 2008 9:24 AM by garag

    XML

    garag
      Hi,

      I have a WebService that return an XML like this:

      <PriceHistory>
      <PriceDetail>
      <Date>2004-01-02</Date>
      <Price>5.000000</Price>
      </PriceDetail>
      <PriceDetail>
      <Date>2004-01-05</Date>
      <Price>5.100000</Price>
      </PriceDetail>
      <PriceDetail>
      <Date>2004-01-06</Date>
      <Price>5.200000</Price>
      </PriceDetail>
      ...
      </PriceHistory>


      I would use the XML values to populate a LineChart, all the nodes "Date" on the x axis and all the nodes "Price" on y axis. The code that I used is the following

      var localSeries : LineSeries = new LineSeries();
      localSeries.dataProvider = XMLReturnedByWebService;
      localSeries.yField = "Price";
      localSeries.xField = "Date";

      but it doesn't work.

      My question is this: is it possible to assign to the dataProvider property of a LineSeries an XML or it is mandatory use an ArrayCollection?

      Any suggestion will be appreciate.

      Thank you very much.

      Regards.