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: <5.0.0.25.2.20010627143030.00a4ceb0@pop.enteract.com>
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.

Regards,
Gavin
Received on Wednesday, 27 June 2001 17:34:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT