W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2000

RE: How can DOM possibly contain a document?

From: Thomas Ashe <Thomas.Ashe@Blackbaud.com>
Date: Thu, 23 Mar 2000 08:52:58 -0500
Message-ID: <05325001EB71D311A4DD00E029347C268EA613@ntpd.blackbaud.com>
To: "'Bernard Miller'" <thatsmrberns2u@yahoo.com>, www-dom@w3.org

The DOM in script would look something like this:

var oStrong = document.createElement('STRONG')
var oText1 = document.createTextNode('Hello, ')
var oI = document.createElement('I')
var oText2 = document.createTextNode('I\'m ')
var oText3 = document.createTextNode('doing fine')


As you can see, the STRONG element has three childNodes, a text node, an I
node(which contains a text node), and another text node.

I think the part you are missing is that the text in the STRONG element are
nodes themselves.

Hope this helps.



> -----Original Message-----
> From: Bernard Miller [mailto:thatsmrberns2u@yahoo.com]
> Sent: Wednesday, March 22, 2000 8:01 PM
> To: www-dom@w3.org
> Subject: How can DOM possibly contain a document?
> Let's say you have a simple nested tag like:
> <STRONG>Hello, <I>I'm </I>doing fine</STRONG>
> I'm having a hard time understanding how one can use
> any combination of DOM functionality to reconstruct a
> document with nested tags. In my primitive
> understanding, the nested tag element is a child
> object and as far as I can tell you can query the
> parent for WHAT the child is, and in what order the
> child appears among other children, but not WHERE it
> is in the text of the parent. Please enlighten me.
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com
Received on Thursday, 23 March 2000 08:53:05 UTC

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