3 Replies Latest reply on Dec 8, 2006 3:50 PM by Uzuul

    Transposing large arrays

    Uzuul
      I am using Flex with local XML files as data source; I am wondering if my source files could be transformed from one structure to another and what would be the most efficient way to proceed.
      Basically I want to transpose an array; like shown below.
      How can I do this? I can not find a method to do so.
      Also, is it possible to apply a XSLT sheet to a XML file from within Flex and store the resulting file in the bin ?

      Thank you very much.


      <clients>

      <client>
      <name>Client A</name>
      <Revenue1>Amount</Revenue1>
      <Revenue2>Amount</Revenue2>
      <Revenue3>Amount</Revenue3>
      </client>

      <client>
      <name>Client B</name>
      <Revenue1>Amount</Revenue1>
      <Revenue2>Amount</Revenue2>
      <Revenue3>Amount</Revenue3>
      </client>

      <client>
      <name>Client C</name>
      <Revenue1>Amount</Revenue1>
      <Revenue2>Amount</Revenue2>
      <Revenue3>Amount</Revenue3>
      </client>

      </clients>

      To

      <Revenues>

      <Revenue1>
      <Client A>Amount</Client A>
      <Client B>Amount</Client B>
      <Client C>Amount</Client C>
      </Revenue1>

      <Revenue2>
      <Client A>Amount</Client A>
      <Client B>Amount</Client B>
      <Client C>Amount</Client C>
      </Revenue2>

      <Revenue3>
      <Client A>Amount</Client A>
      <Client B>Amount</Client B>
      <Client C>Amount</Client C>
      </Revenue3>

      <Revenues>