|
Ben,
I'm not an expert on the XML type, nor label functions
or UI components, but some things to consider in your
investigation:
1. You can get a list of all of the namespaces from an XML
instance using:
var namespaces:Array =
myXML.namespaceDeclarations();
var ns:Namespace; for each (ns in namespaces) {
// Can
check through each ns.prefix to find the default NS and get its ns.uri
property
if (ns.prefix ==
"")
defaultNSURI = ns.uri;
}
2. In
the methods on the XML type that take an element name to operate on, you don't
have to pass in a string, you can pass in a QName. So, construct a QName from
the URI found in the default namespace avoid and pass this to the method on XML
to perform your search.
var qname:QName = new
QName(defaultNSURI, "message");
var messages:XMLList = myXML.child(qname); (Note that using a QName to lookup a property is also valid
for objects using the square-bracket syntax ... myobj[qname] works just like
myobj[dynamicPropNameString]... in fact, the public namespace is just a special
case, most things should theoretically be looked up by QName
if using other namespaces).
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: Wednesday, June 07, 2006 5:07 PM To: [email protected] Subject: [flexcoders] Re: Namespace hell From what I can gather, default namespaces in XML data simply aren't -- 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
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Re: Namespace hell Peter Farland
- Re: [flexcoders] Re: Namespace hell Ben Clinkinbeard
- Re: [flexcoders] Re: Namespace hell Tom Chiverton
- [flexcoders] Re: Namespace hell ben.clinkinbeard
- Re: [flexcoders] Re: Namespace hell Tom Chiverton
- RE: [flexcoders] Re: Namespace hell Gordon Smith
- [flexcoders] Re: Namespace hell ben.clinkinbeard
- [flexcoders] Re: Namespace hel... Geoffrey Williams
- RE: [flexcoders] Re: Namespace hel... Jason Hawryluk
- [flexcoders] Re: Namespace hel... ben.clinkinbeard
- RE: [flexcoders] Re: Names... Jason Hawryluk

