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

Why can't you set an element's value?

From: Gavin Stokes <gavin@AmbitiousProductions.com>
Date: Wed, 27 Jun 2001 14:37:04 -0700
Message-Id: <>
To: W3C DOM mailing list <www-dom@w3.org>
I'm trying to be patient and learn the reasoning behind some DOM design 
decisions.  To that end, let me ask: Why does setNodeValue on an Element do 
nothing?  Given that XML is all text, shouldn't every element be able to 
contain text as its value?  What other kind of value would it contain, 
anyway?  Why do we have to add a text node?

There is question after question on various DOM-implementation discussion 
forums from people who are baffled by the fact that setNodeValue does 
nothing, so I know this is a source of bewilderment for many.

Received on Wednesday, 27 June 2001 17:34:39 UTC

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