W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2001

Document.createTextNode(null) and CharacterData.setData(null)

From: Sander Bos <sander@x-hive.com>
Date: Wed, 24 Oct 2001 11:01:29 +0200
Message-ID: <41D11F414A26E942912B7E7696DC8E2206153B@JAKARTA.xhive.archipel>
To: <www-dom@w3.org>

(My apologies if this has come up before, I looked with google as
suggested on the mail archives page but could not find a similar
question)

Hi there,

My question is whether
	Document.createTextNode(null)
is allowed (the same goes for CharacterData.setData(null)).

I could not find anything in the specification that disallows it.
If it is allowed, what should happen when I do (in the Java-binding)
	Text someText = document.createTextNode(null);
	System.out.println(someText.getLength());
	System.out.println(someText.getData());
	someText.appendData("bar");
	System.out.println(someText.getData());
And what do I do on serialization in load/ save?

If it isn't allowed, what exception should I throw?

(currently, we simply allow it to be null, although appendData dies)

Kind regards,

--Sander.

-- 
X-Hive Corporation (www.x-hive.com)
email: sander@x-hive.com
phone: +31 10 7108625
 
Received on Wednesday, 24 October 2001 05:02:01 GMT

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