R: [jdom-interest] update attribute

Antonello Dell'Armi A.Dellarmi at ELIS.ORG
Thu Dec 19 01:39:59 PST 2002

Many thanks your solution works!!!!

-----Messaggio originale-----
Da: Hallvard Trætteberg [mailto:hal at idi.ntnu.no]
Inviato: mercoledì 18 dicembre 2002 22.40
A: Antonello Dell'Armi
Oggetto: RE: [jdom-interest] update attribute


> In my program each time i need to update an element i have to do:
> element.removeAttribute("myatribute");
> element.setAttributes(attList);
> Is there a shortcut? setAttribute(String name , String value) 
> doesn't work...

Have you tried element.getAttribute("myattr").setValue("myvalue")? This changes the existing attribute's value, instead of creating a new attribute, which setAttribute does.


More information about the jdom-interest mailing list