W3C home > Mailing lists > Public > public-webapi@w3.org > April 2008

Re: [XMLHttpRequest] Comment on the example in Section 1

From: Subbu Allamaraju <subbu.allamaraju@gmail.com>
Date: Thu, 17 Apr 2008 20:03:37 -0700
Cc: public-webapi@w3.org
Message-Id: <961395AF-1AB0-47C5-BCC9-82461784C581@gmail.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>

The difference is the xmlns declaration. The example requires an XHTML  
resource to work.

In any case, IMHO, this example is a bit more complex than necessary.

Subbu

On Apr 17, 2008, at 10:56 AM, Boris Zbarsky wrote:
> Subbu Allamaraju wrote:
>> Yes, indeed. It works with the specific example you tried below  
>> (using XHTML), but not for generic XML, which is what the draft is  
>> using.
>
> My test works the same way if I rename the file to "test.xml".
>
> I'm not sure what you mean by "generic XML", especially because the  
> example in the draft doesn't have the document it's using but just  
> the filename.  If you mean that if you put some random XML that  
> doesn't have any attributes of type ID in the file, then  
> getElementById won't return anything... then that seems like a  
> tautology.  None of the nodes have IDs in that case.
>
> -Boris
Received on Friday, 18 April 2008 03:04:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 18 April 2008 03:04:17 GMT