You can reference a namespace object if you put this in a file:
package mypackage {
public namespace DoSearch =
"http://site.com/BackOffice/DoSearch";
}
"import mypackage.DoSearch" in each class where you want to use it, and
then "use namespace DoSearch".
-Brian
> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard
> Sent: Wednesday, July 12, 2006 9:47 AM
> To: [email protected]
> Subject: [flexcoders] Re: Addressing buried children in XML
> with default namespace- an easier way?
>
> Bumping this up in the hopes that someone (possibly from Adobe?) can
> offer an alternative, or at least an explanation of why this is the
> case. As it stands now, I will have to have these lines:
>
> namespace foo = "http://site.com/BackOffice/DoSearch";
> use namespace foo;
>
> sprinkled throughout my app, which sucks. Why can't use namespace
> point to an actual Namepsace object? I feel like this is a glaring
> hole in Flex's XML capabilities.
>
> Thanks,
> Ben
>
> > It seems that the only way to use the full functionality of E4X with
> > namespaced XML is by using this method:
> >
> > namespace foo = "http://site.com/BackOffice/DoSearch";
> > use namespace foo;
> >
> > Unfortunately, that method must be constructed exactly like
> that- with
> > a static string. You cannot even point it to a constant like
> > MyAppClass.SEARCH_NAMESPACE, which is fairly disappointing.
> I suppose
> > the namespaces your app uses aren't something that will change very
> > often but it still seems like this is a shortcoming of the
> > implementation of E4X. I feel like I am being punished for using XML
> > that contains namespaces, as it is so crippled in comparison to
> > namespace-free XML.
> >
> > Adobe, can you fix this in a future release?
> >
> > Thanks,
> > Ben
> >
>
>
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> Yahoo! Groups gets a make over. See the new email design.
> http://us.click.yahoo.com/XISQkA/lOaOAA/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
>
>
>
>
>
>
>
>
--
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/