OK, I have posted several times now about problems caused by having
namespaces in XML in Flex (specifically Beta 3), and have gotten
virtually no responses. Please, someone respond, even if to say "I
have the same problem" or "this can't be done". I am beginning to
think that Flex is simply not very capable in this area. I seriously
hope this is not the case.

Default namespaces seem to be the most problematic, as they seem to
prevent the XML from even being used as a DataProvider. Take this
simple setup.

=======================
var entries:XML = 
<rootNode xmlns="http://site.com/Back/DocMetadata";>
        <Entry>
          <CreateDate>5/5/2006 9:56:30 AM</CreateDate>
          <DocumentType>RPR</DocumentType>
        </Entry>
        <Entry>
          <CreateDate>5/3/2006 3:07:27 PM</CreateDate>
          <DocumentType>RPR</DocumentType>
        </Entry>
</rootNode>;

namespace d = "http://site.com/Back/DocMetadata";;
var list:XMLListCollection = new XMLListCollection(entries.d::Entry);
myDataGrid.dataProvider = list;

<mx:DataGrid id="myDataGrid" x="10" y="247" width="536" height="230">
        <mx:columns>
                <mx:DataGridColumn headerText="Column 1" 
dataField="CreateDate"/>
                <mx:DataGridColumn headerText="Column 2" 
dataField="DocumentType"/>
        </mx:columns>
</mx:DataGrid>
=======================

This results in the DataGrid being populated with 2 items, but there
is no text displayed. You simply have empty rollovers. However, if you
remove the namespace from the xml and update the AS accordingly,
everything works correctly, with text being displayed as expected. Is
this really a shortcoming of Flex or am I missing something really simple?

Thanks,
Ben





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Home is just a click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to