1 Reply Latest reply on Sep 25, 2007 3:59 PM by Senor_Roberto

    complex xml in tree

    stevenvanrij
      Hi there! I've been reading and googling for ages and I cannot find the solution to this problem, I want to load an xml into a <mx:tree> but i don't want to load all the xml structure. My xml look like this:
      <DataSet>
      <diffgr:diffgram>
      <NewDataSet>
      <Show>
      <uselessProperty>asdasd</uselessProperty>
      <uselessProperty1>asdasd</uselessProperty1>
      <uselessProperty2>asdasd</uselessProperty2>
      <uselessProperty3>asdasd</uselessProperty3>
      <Title>Title of the show</Title>
      <episodes>
      <episode1>
      <uselessProperty>asdasd</uselessProperty>
      <uselessProperty1>asdasd</uselessProperty1>
      <uselessProperty2>asdasd</uselessProperty2>
      <uselessProperty3>asdasd</uselessProperty3>
      <Title>Title of the show</Title>
      </episode1>
      <episode2>
      <uselessProperty>asdasd</uselessProperty>
      <uselessProperty1>asdasd</uselessProperty1>
      <uselessProperty2>asdasd</uselessProperty2>
      <uselessProperty3>asdasd</uselessProperty3>
      <Title>Title of the show</Title>
      </episode2>
      <episode3>
      <uselessProperty>asdasd</uselessProperty>
      <uselessProperty1>asdasd</uselessProperty1>
      <uselessProperty2>asdasd</uselessProperty2>
      <uselessProperty3>asdasd</uselessProperty3>
      <Title>Title of the episode</Title>
      </episode3>
      </episodes>
      </Show>
      <Show>
      <uselessProperty>asdasd</uselessProperty>
      <uselessProperty1>asdasd</uselessProperty1>
      <uselessProperty2>asdasd</uselessProperty2>
      <uselessProperty3>asdasd</uselessProperty3>
      <Title>Title of the show</Title>
      <episodes>
      <episode1>
      <uselessProperty>asdasd</uselessProperty>
      <uselessProperty1>asdasd</uselessProperty1>
      <uselessProperty2>asdasd</uselessProperty2>
      <uselessProperty3>asdasd</uselessProperty3>
      <Title>Title of the show</Title>
      </episode1>
      <episode2>
      <uselessProperty>asdasd</uselessProperty>
      <uselessProperty1>asdasd</uselessProperty1>
      <uselessProperty2>asdasd</uselessProperty2>
      <uselessProperty3>asdasd</uselessProperty3>
      <Title>Title of the show</Title>
      </episode2>
      <episode3>
      <uselessProperty>asdasd</uselessProperty>
      <uselessProperty1>asdasd</uselessProperty1>
      <uselessProperty2>asdasd</uselessProperty2>
      <uselessProperty3>asdasd</uselessProperty3>
      <Title>Title of the episode</Title>
      </episode3>
      </episodes>
      </Show>
      </NewDataSet>
      </diffgr:diffgram>
      </DataSet>

      I want to know if there is any way I can show the title of the show and the titles of the episodes as its children. By this time I've been just able to show the whole xml in the tree, but i just need those properties. I cannot find information about xml that doesn't have this format:

      <node property1="property" property1="property" property4="property" property3="property">
      <child property1="property" property1="property" property4="property" property3="property"/>
      <child property1="property" property1="property" property4="property" property3="property"/>
      <child property1="property" property1="property" property4="property" property3="property"/>
      </node>

      Please help me, my eyes will start bleeding if keep googling another nite.