>
> I have a string of valid XML that I want to show in a tree control. I
> can not get the tree to render my XML. All it will show me is one
> node with the entire XML string as the label.
>
> Isn't a control is supposed to be able to render an XMLDocument
> correctly.
>
> Anybody see what I am doing wrong below?
>
> public function setMenuInTree(menu:ArrayCollection):XMLDocument{
> var menuXml:XMLDocument = new XMLDocument(menu.getItemAt
> (0).menu_xml_string);
>
> menuItemsTree.dataProvider = menuXml;
> }
>
Make sure that you've set a labelField on the Tree in the form of
'@attributeName', for example labelField="@label".
Also verify that your data confirms to the requirements of the
DefaultDataDescriptor or else you'll need your own impl of
ITreeDataDescriptor.
You might also verify that your XML string can be parsed into XML by
trying something like:
myXMLTest:XML = new XML("<myXMLString/>");
HTH,
Michael
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

