1 Reply Latest reply on Aug 24, 2006 9:54 PM by jasowill

    can someone help me ?

      i use asp.net webservice return follow xmldatadocument:( http://localhost/SpryData/DataTableWebService.asmx/GetCustomers)
      <?xml version="1.0" encoding="utf-8"?>
      <CustomerID>ABC </CustomerID>
      <CompanyName>ABC Company</CompanyName>
      <ContactName>John Smith</ContactName>
      <Address>One My Way</Address>
      <CompanyName>Alfreds Futterkiste</CompanyName>
      <ContactName>Maria Anders</ContactName>
      <ContactTitle>Sales Representative</ContactTitle>
      <Address>Obere Str. 57</Address>
      <CompanyName>Ana Trujillo Emparedados y helados</CompanyName>
      <ContactName>Ana Trujillo</ContactName>
      <Address>Avda. de la Constitución 2222</Address>
      <City>México D.F.</City>
      <Phone>(5) 555-4729</Phone>
      <Fax>(5) 555-3745</Fax>

      i can use it in datagrid with {Service.GetCustomers.lastResult.GetCustomersResult.NewDataSet.Table}
      but i can't use it in ArrayCollection and XMLListCollection.

      if someone can use it ,please tell me ,thanks !

      email: youngsun45@gmail.com
        • 1. Re: can someone help me ?
          jasowill Level 1
          You won't be able to use the xml in an ArrayCollection directly. If you need to use an ArrayCollection you will have to convert the elements to objects and add them yourself. In the example you provided the XMLListCollection is being created on your behalf when you assign the e4x expression to the dataProvider via binding. Within the setter for the dataProvider property there is a check of the data type (in this case XMLList) and based on the type it will constuct an appropriate collection support object (in this case XMLListCollection).