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

Re: method cloneNode ... can i overide the attributes ? ... urgent

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Wed, 29 Aug 2007 19:30:27 -0700
Message-ID: <c9e12660708291930t262e6abdh565d089e3ab22fbc@mail.gmail.com>
To: Eddhie_Kurnianto@app.co.id, www-dom@w3.org

On 8/29/07, Garrett Smith <dhtmlkitchen@gmail.com> wrote:
> the nodeName property cannot be changed.
>
> An attribute (except IDREF) can be changed.
>
> 1) Figure out what you want to do
> 2) Check the relevant specification (is it Java DOM, or ECMAScript?
> what type of document?)
> 3) write a simple test.
>
> Garrett
>
> On 8/29/07, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
> >
> > * Eddhie_Kurnianto@app.co.id wrote:
> > >i'am newbie in DOM.
> >
> > Then a better venue would be a newsgroup or mailing list covering DOM
> > programming questions, for example, the `comp.text.xml` newsgroup. The
> > www-dom mailing list is primarily concerned with improving the W3C DOM
> > specifications.
> >
> > >currently i'm using method cloneNode for copying serveral html item and it
> > >already works
> > >but for certain case i need to overide the name of the node ; which is the
> > >attribute of the node
> > >i have tried to overide it but seems it not works
> > >
> > >can i overide it ?
> > >if it can be overiden, could you please give me a sample of code
> >
> > I am not entirely sure what you are asking, but you generally cannot
> > change the name of a node in the DOM, except through the renameNode
> > method introduced in DOM Level 3. You will have to create new nodes
> > with the desired name, and move whatever content it should have over
> > to it (and finally remove the old node where appropriate). For more
> > complex transformations you might want to have a look at XSLT.
> > --
> > Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
> > Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
> > 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
> >
> >
>
>
> --
> http://dhtmlkitchen.com/
>


-- 
http://dhtmlkitchen.com/
Received on Thursday, 30 August 2007 02:30:33 GMT

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