W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2000

a question about entities and special characters

From: Wolfgang Schwarz <wolfgang.schwarz@tool42.com>
Date: Tue, 08 Aug 2000 10:37:01 +0200
Message-ID: <398FC6AD.DD079AC6@tool42.com>
To: www-dom@w3.org

hello,

I'm a bit confused about entities in the DOM.

I'm German, so I use a lot of special characters like &auml; in my
pages. Are all these characters single nodes in the DOM? (They don't
appear as childNodes anywhere, but neither do attributes.) And when I
create a TextNode, can I use those entities there? I.e., is it allowed
to call
   document.createTextNode("m&auml;h")
or
   document.createTextNode("mäh")
or do I have to create an entity node (or an "entity reference" node - I
didn't really understand what that is) and somehow append it to the
TextNode? 

Mozilla M16 and IE5/win98 seem to cope well with special characters in
TextNodes. However, IE5/MacIntosh get's even more confused then me when
creating TextNodes with special characters (no matter if I "escape" them
as "&auml;" or not): It displays rather weird text and tends to crash
soon. Is this a bug in IE5/Mac or my mistake?

Any clarification would be appreciated.

Wolfgang.
Received on Tuesday, 8 August 2000 04:37:07 GMT

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