-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I just ran into this problem too. And unfortunately this post was quite a while ago and I can't seem to find an answer... But I did find a workaround. It's not pretty and it seems there should be a better way. But until the better way is found, try something like this:
<mx:DataGridColumn dataField="age"> <mx:itemRenderer> <mx:Component> <mx:Label text="{(data as XML).samples::age}"> <mx:Script> <![CDATA[ private namespace samples = "http://census.samples"; use namespace samples; ]]> </mx:Script> </mx:Label> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> - -James kevntrace wrote: > Thanks Derek. I did read in the docs about declaring a namespace > variable - indeed if you look at the code I posted, you will see I > did exactly that with a variable named csw. I also tried > referencing the namespace in different ways - using the variable, > using wildcards etc. I still got nothing to work. > > Could you take another look at my code and try to put in context how > I would declare and use that namespace variable? Like I said, I am > a complete newbie to Flex, and this really is my first ever project > and I've had no training. So I'm not sure the namespace variable > I've used is in scope when I'm trying to parse the result document, > I'm not sure on how to mix MXML and ActionScript (so just giving me > an extract of ActionScript code without showing me how to include it > in my MXML doesn't really help too much). I do appreciate all the > responses from everyone though. > > > Excerpt where I declare the namespace var; > <mx:Script> > <![CDATA[ > import mx.controls.Alert; > private namespace csw > = "http://kevin.company.com/services/webservices/adobe/blogSvc/blogPo > rt"; > use namespace csw; > ]]> > </mx:Script> > > Excerpt where I try to parse out using the namespace (none of these > work); > <mx:columns> > <mx:DataGridColumn headerText="Top Posts" > dataField="*::getMostPopularPostsResponse.*::ColumnList.*::row.*::ite > m"/> > <mx:DataGridColumn headerText="Clicks" > dataField="getMostPopularPostsResponse.ColumnList.row.item" > width="75"/> > <mx:DataGridColumn headerText="Blah" > dataField="csw::getMostPopularPostsResponse.csw::ColumnList.csw::row. > csw::item" width="75"/> > </mx:columns> > > > > --- In flexcoders@yahoogroups.com, "Derek Adams" <[EMAIL PROTECTED]> > wrote: >> I have been successful in doing that by declaring the namespace as > a >> local variable in ActionScript, then using it in the e4x query. > For >> instance: >> >> private var aps:Namespace = new Namespace >> ("http://cadtel.com/APWebService"); >> >> model.currentOrderPaths = >> results.aps::Order.aps::RelatedPaths.aps::Paths.aps::NetworkPath; >> >> Hope that helps, >> Derek >> > > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE+iVesZ9+wiQzdmARAp2iAJoCskU6Zls3Q04H/YTt/ZvLJ+i6vgCgj0I3 a4nTJOoX/rDlAI5nHY50uz4= =H9Lx -----END PGP SIGNATURE----- -- 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/