W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2000

Re: text nodes and element nodes

From: <keshlam@us.ibm.com>
Date: Mon, 10 Apr 2000 19:06:53 -0400
To: www-dom@w3.org
Message-ID: <852568BD.007EED6A.00@D51MTA03.pok.ibm.com>
An element has no nodeValue. You have to navigate down one more level, to
the element's children -- which, for your SESSIONID and COMMUNITYID tags,
will be a single Text node whose value is the string you're looking for.

DOM Level 2's Range and Traversal chapters may be useful in gathering
larger chunks of text. In particular, I believe Range has an operation that
retrieves all text within that Range. But that does require creating and
using another object.

"Text Node Amelioration" (generally, gathering the text contained in a
subtree) is an open issue for DOM Level 3 and later. There are some
disagreements about how much more is needed, and exactly how it should

Joe Kesselman  / IBM Research
Received on Monday, 10 April 2000 19:07:45 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:06 UTC