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

Re: getElementById

From: Andreas Wuertz <andreas.wuertz@information-factory.com>
Date: Thu, 4 Jul 2002 13:14:06 +0200
Message-ID: <002c01c2234b$ea7ee7e0$54a47ed4@IF>
To: "Marcel Modes" <Marcel.Modes@gmx.de>, <www-dom@w3.org>

Marcel,

If you are referring to the JAXP implementation of DOM, call the
setIdAttributeName() method of the added ElementNode. It helps, although in
my opinion it should not be necessary, since the DTD already describes the
id attribute and the node is created by the document. Thus it should already
know what attribute is the id.

Cheers
Andy

----- Original Message -----
From: "Marcel Modes" <Marcel.Modes@gmx.de>
To: <www-dom@w3.org>
Sent: Thursday, July 04, 2002 12:27 PM
Subject: getElementById


>
> Hi,
>
> after appending an Element to the root node
> it is not possible to reffer to it by
> "getElementById",
> even though this method works on all other
> nodes I parses in before with the help
> of the DocumentBuilderFactory.
> After saving and reloading i can refer
> to the new Node by getElementById.
>
> How can I make "getElementById" work
> for appended elements?
>
> Thanks for reply
>
> Marcel
Received on Thursday, 4 July 2002 07:10:52 GMT

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