W3C home > Mailing lists > Public > www-dom-ts@w3.org > July 2003

Re: Should Node.getChildNodes return Text of Attr?

From: Joris Huizer <joris_huizer@yahoo.com>
Date: Wed, 2 Jul 2003 08:00:05 -0700 (PDT)
Message-ID: <20030702150005.85679.qmail@web20203.mail.yahoo.com>
To: Min Lee <minwoo75@hotmail.com>, www-dom-ts@w3.org


--- Min Lee <minwoo75@hotmail.com> wrote:
> 
> 
> 
> 
> Hi all,
> 
> For the following XML:
> 
>   <?xml version='1.0'?><foo f='100'></foo>
> 
> when getChildNodes() is called on the root element,
> different 
> implementations of DOM return NodeList of different
> length.
> 
> Xerces2-J and Crimson return a NodeList which
> contains 1 Text node of value 
> "100"
> DOM4j and Python's minidom return a NodeList
> containing no nodes.
> 
> This could be a problem if one's doing a comparison
> between two DOM 
> implementations.  Unfortunately, this case is not
> covered by the current 
> DOM-TS, and I couldn't find anything on DOM spec. 
> What should be the 
> correct haviour?
> 
> Thanks in advance,
> 
> ML

I think attributes should not show up as childnodes...
wether an element is the root element shouldn't make a difference

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
Received on Wednesday, 2 July 2003 11:03:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 April 2009 12:58:48 GMT