1 Reply Latest reply on Sep 8, 2009 6:58 PM by existdissolve

    Flex+SharePoint List XML

    jeffmedford

      I read up on several blogs about how to get List data from SharePoint into Flex.  A very easy way seems to be described on this blog using the owssvr.dll commands to output XML.

       

      My issue is that I cannot figure out how to parse through the XML that is returned to populate an XMLList or ArrayCollection or just into a DataGrid.

       

      Here is a sample of what is returned...I have put in BOLD what I am trying to List out - the actual list items:

       

      <?xml version="1.0" encoding="utf-8"?>

      <xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'

      xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'

      xmlns:rs='urn:schemas-microsoft-com:rowset'

      xmlns:z='#RowsetSchema'>

      <s:Schema id='RowsetSchema'>

      <s:ElementType name='row'

      content='eltOnly'

      rs:CommandTimeout='30'>

      <s:AttributeType name='ows_LinkTitle'

      rs:name='Title'

      rs:number='2'>

      <s:datatype dt:type='string'

      dt:maxLength='512' />

      </s:AttributeType>

      <s:AttributeType name='ows_AnnotationID'

      rs:name='Annotation ID'

      rs:number='3'>

      <s:datatype dt:type='string'

      dt:maxLength='512' />

      </s:AttributeType>

      <s:AttributeType name='ows_MediaPath'

      rs:name='Media Path'

      rs:number='4'>

      <s:datatype dt:type='string'

      dt:maxLength='512' />

      </s:AttributeType>

      <s:AttributeType name='ows_TimeCode'

      rs:name='Time Code'

      rs:number='5'>

      <s:datatype dt:type='string'

      dt:maxLength='512' />

      </s:AttributeType>

      </s:ElementType>

      </s:Schema>

      <rs:data>

      <z:row ows_LinkTitle='my first test item'

      ows_AnnotationID='b3cd9a8c-e7d1-439e-b910-a94e1d91f406'

      ows_MediaPath='http://localhost, http://localhost/media1.wmv'

      ows_TimeCode='00:00:03.1234567' />

      <z:row ows_LinkTitle='my second test item'

      ows_AnnotationID='b3cd9a8c-e7d1-439e-b910-a94e1d91f406'

      ows_MediaPath='http://localhost, http://localhost/media2.wmv'

      ows_TimeCode='00:00:03.1234567' />

      </rs:data>

      </xml>

       

      Any help on an HTTPService request that returns the XML and then collects it into the right variable to bind it around my application would be very helpful.  I just need to know how to drill down to those nodes to get at the data I want.

       

      Thank you.