> // x2.namespace("")
> undefined
Wonder if that's a bug. While it would seem the empty quote isn't
necessary, it should work as in the following example:
var xml:XML =
<Metadata xmlns="http://site.com/Back/DocMetadata">
<RPRDocumentHistory>
<MetadataType>RPRDocumentHistory</MetadataType>
</RPRDocumentHistory>
</Metadata>;
trace (xml.namespace (), xml.namespace (""));
--- In [email protected], "ben.clinkinbeard"
<[EMAIL PROTECTED]> wrote:
>
> OK, first off, thanks to everyone for their help on this. I think I
> have a basic understanding of things now.
>
> Tom, namespaceDeclarations() does return an array, but default
> namespaces do not seem to be included in it if you have an XML var
> that was extracted from a larger piece of data, like a SOAP
response.
> If you define a simple XML var in your code, however, the default
> namespace is included in the array returned by
> namespaceDeclarations(). This is very puzzling behavior that I
would
> still love to get some clarification on. Should it really behave
this way?
>
> Gordon, thanks for your clarifications, although in my case it
seems
> that not passing an argument to the namespace() method works but
> passing an empty string does not, as you can see in my example
below.
> I also think the ability to pass a QName to labelField would be
awesome.
>
> Here are the results of my basic test.
>
> // create xml var from a subset of my SOAP response
> var x:XML = new XML(event.message.body);
> namespace d = "http://site.com/Back/DocMetadata";
> use namespace d;
> var x2:XML = new XML(x..Metadata);
>
> // x2.toString()
> <Metadata xmlns="http://site.com/Back/DocMetadata">
> <RPRDocumentHistory>
> <MetadataType>RPRDocumentHistory</MetadataType>
> </RPRDocumentHistory>
> </Metadata>
>
> // x2.namespaceDeclarations().toString()
> (returns nothing, array is empty)
>
> // x2.namespace()
> http://fmr.com/BackOffice/DocumentMetadata
>
> // x2.namespace("")
> undefined
>
>
> Thanks,
> Ben
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
You can search right from your browser? It's easy and it's free. See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/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/