From:  "Michael Daeumling" <daumling@adobe.com>
Date:  15 Sep 2006 12:55:54 Hong Kong Time
Newsgroup:  news.mozilla.org/netscape.public.mozilla.jseng
Subject:  

Re: Unexpected output in E4X using XML literal with namespaces

NNTP-Posting-Host:  71.139.17.122

Try:

default xml namespace = http://tempuri.org;

or use:

print (doc.*::ResetTarget.*::Target);

If you have XML with a default namespace, you need to declare that namespace 
as being default before you can use unqualified names to access the XML, or 
you use *:: as the namespace of your elements.
-- 
Michael

 wrote in message 
news:1154461575.260608.258960@m73g2000cwd.googlegroups.com...
> When I assign a variable to an XML literal with xmlns attributes, E4X
> processing seems to generate unexpected output. I am using Rhino 1.6R1.
>
>
> Here is an example with xmlns used:
>
> js> doc= xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:x
> si="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://tempuri.org/">
>  
>      All Hosts
>      Active Directory
>      
>  
> 
> *** JS tool echoes the XML document ***
> js> print(doc.ResetTarget.Target);
>
> js>
>
> A blank output is generated.
>
> If I remove the xmlns attributes, I get the expected output:
> js> doc=
>  
>      All Hosts
>      Active Directory
>      
>  
> 
> *** JS tool echoes the XML document ***
> js> print(doc.ResetTarget.Target);
> Active Directory
> js>
>
> Am I doing something wrong or is this a bug?
> Thanks.
> -Raj
>