You can also write a TreeDataDescriptor look for the ITreeDataDescriptor
interface. No transformations needed.



On 9/10/07, Alex Harui <[EMAIL PROTECTED]> wrote:
>
>    You'll probably have to transform the data to match
>
>
>
> <company>
>
>             <department label="Accounting">
>
>                         <user>….</user>
>
>             </department>
>
>
>
> Then a custom labelFunction that determines what label.
>
>
>
> Then a custom dataDescriptor that denies that user has any children (or
> convert all subchildren to attributes).
>
>
>  ------------------------------
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *donvoltz
> *Sent:* Monday, September 10, 2007 3:15 AM
> *To:* [email protected]
> *Subject:* [flexcoders] Help Creating Tree from Complex XML
>
>
>
> Hello,
>
> would someone be able to give some guidance in the construction of a
> tree control from complex XML.
>
> I am trying to create the following tree display
>
> Accounting
> --John Waters
> --Betty Smith
> Sales
> --Bob Long
> --Sam Schwartz
> Marketing
> --Howard Lyons
> Human Resources
> --Sue Taylor
> --Bill Montgomery
>
> using this XML as a starting point
>
> <row>
> <user>
> <userID>1</userID>
> <department>Accounting</department>
> <firstname>John</firstname>
> <lastname>Waters</lastname>
> <email>[EMAIL PROTECTED] <johnwaters%40aol.com></email>
> <officePhone>555-1212</officePhone>
> <birthday>1965-08-12</birthday>
> /<user>
> ...
> </row>
>
> Currently I am returning a similar XML stream from a MySQL database
> as e4X and it is bound to an XMLListCollection. This collection then
> is used as the dataProvider for my tree control. and department is
> used as the label. What I would like to see is all of the users of a
> given department are within one branch of the tree and when this
> brach is open I would see their first and last names. Currently, this
> set up creates a brach for listing the department for each user in
> the XMLListCollection and when this branch is opened, all of their
> data is contained. What is the process of grouping all departments
> together and then only displaying part of the XMLListCollection
> within the branch?
>
> Thanks for the help
>
> Don
>
>  
>

Reply via email to