views:

97

answers:

0

How do I read a DataSet returned by a webservice in AS2?

function showTopItem(obj:XML) {
    trace(obj);
}

gives me:

[object Object]

I expect to read this:

<?xml version="1.0" encoding="utf-8"?>
<DataSet xmlns="http://tempuri.org/"&gt;
  <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
      <xs:complexType>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="Table">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="ItemDesc" type="xs:string" minOccurs="0" />

                <xs:element name="ItemImage" type="xs:string" minOccurs="0" />
                <xs:element name="ItemDescription" type="xs:string" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
    </xs:element>
  </xs:schema>

  <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    <NewDataSet xmlns="">
      <Table diffgr:id="Table1" msdata:rowOrder="0">
        <ItemDesc>11111</ItemDesc>
        <ItemImage>http://devshed.e-games.com.ph/RaffleEngine/WebSite/Images/Items/2-25-2010_3-10-2009_790.jpg&lt;/ItemImage&gt;
        <ItemDescription>11111</ItemDescription>
      </Table>

      <Table diffgr:id="Table2" msdata:rowOrder="1">
        <ItemDesc>7777</ItemDesc>
        <ItemImage>http://devshed.e-games.com.ph/RaffleEngine/WebSite/Images/Items/2-25-2010_3-10-2009_790.jpg&lt;/ItemImage&gt;
        <ItemDescription>7777</ItemDescription>
      </Table>
      <Table diffgr:id="Table3" msdata:rowOrder="2">
        <ItemDesc>8888</ItemDesc>

        <ItemImage>http://devshed.e-games.com.ph/RaffleEngine/WebSite/Images/Items/2-25-2010_3-10-2009_547.jpg&lt;/ItemImage&gt;
        <ItemDescription>8888</ItemDescription>
      </Table>
      <Table diffgr:id="Table4" msdata:rowOrder="3">
        <ItemDesc>added item2</ItemDesc>
        <ItemImage>http://devshed.e-games.com.ph/RaffleEngine/WebSite/Images/Items/2-25-2010_3-10-2009_790.jpg&lt;/ItemImage&gt;
        <ItemDescription>Item Description</ItemDescription>

      </Table>
      <Table diffgr:id="Table5" msdata:rowOrder="4">
        <ItemDesc>asdf</ItemDesc>
        <ItemImage>http://devshed.e-games.com.ph/RaffleEngine/WebSite/Images/Items/2-25-2010_3-10-2009_790.jpg&lt;/ItemImage&gt;
        <ItemDescription>Item Description</ItemDescription>
      </Table>
      <Table diffgr:id="Table6" msdata:rowOrder="5">

        <ItemDesc>edit item</ItemDesc>
        <ItemImage>http://devshed.e-games.com.ph/RaffleEngine/WebSite/Images/Items/2-25-2010_3-10-2009_790.jpg&lt;/ItemImage&gt;
        <ItemDescription>Item Description</ItemDescription>
      </Table>
      <Table diffgr:id="Table7" msdata:rowOrder="6">
        <ItemDesc>test1</ItemDesc>
        <ItemImage>http://devshed.e-games.com.ph/RaffleEngine/WebSite/Images/Items2-25-2010_3-10-2009_355.jpg&lt;/ItemImage&gt;

        <ItemDescription>test1</ItemDescription>
      </Table>
    </NewDataSet>
  </diffgr:diffgram>
</DataSet>