Re: New spec. Questions

>>appendChild takes a Node argument and not a string.  Could you try again

Sure. Basically what I am asking is  , once you've created an object how do
you insert it into the tree.

I start with:

<xdoc>
<greeting>Hello XML</greeting>
</xdoc>

I want to end up with

<xdoc>
<greeting>Hello XML</greeting>
<greeting>Hello DOM</greeting>
</xdoc>

I create an element greeting with

        document.createElement(greeting)

I create a text node with

        document.createTextNode("Hello DOM")

How do I insert them into my document tree? by append child? by
insertBefore?

If I use append child, how do I reference them, because as you say they are
not inserted into the tree therefore cannot be referenced by a nodeList
integer.

Frank

-----Original Message-----
From: Don Park <donpark@quake.net>
To: Dom mailing list <www-dom@w3.org>
Date: Thursday, July 23, 1998 7:07 AM
Subject: Re: New spec. Questions


>Frank,
>
>Document.createXXX() methods do not insert the created objects into the
>tree.
>
>I am afraid your second question looks to me like an aftermath of too many
>insertBefore and appendChild.  what are greeting[1] and text[1]?
>appendChild takes a Node argument and not a string.  Could you try again?
>
>Best wishes,
>
>Don Park
>
>
>

Received on Thursday, 23 July 1998 17:30:14 UTC