> For setting the content of a text element one can use either
> .nodeValue or .data - which one is correct and standards conform and
> which not?
Both, but they're a bit different. The nodeValue field is defined for
all Nodes and maps to different things depending on the node type.
The data field is defined on Nodes that inherit from CharacterData,
which is to say Text, CDATASection, and Comment nodes. For those
three node types, nodeValue maps straight to data. I know it's weird,
but the DOM does have quite a few such irrelevant duplication due to
trying to make the vendors happy back then.
Note that if the implementation you're using supports DOM 3 or the
uDOM then you don't want to use fooElem.firstChild.data (which is
wrong and will blow up in a number of cases) but rather
fooElem.textContent which will do what you really want most of the time.
--
Robin Berjon
Senior Research Scientist
Expway, http://expway.com/
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/1U_rlB/TM
--------------------------------------------------------------------~->
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/