[jdom-interest] updating an attribute

Jason Hunter jhunter at acm.org
Wed Jul 4 10:52:53 PDT 2001


This bug was discussed here just this week.  It's fixed in b7rc3 and
later.

As for adding at the end, that's the default.  You can get the list
itself if you want to play with ordering -- although technically in XML
ordering is not required to be maintained we do let you control it.

-jh-

Peter Barraud wrote:
> 
> is it possible to update an element attribute
> I tried to use setAttribute on an already existing attribute and it created
> a duplicate attribute
> I then removed and then added an attribute, it placed the new attribute
> right at the end
> am I doing anything wrong or it this what it should be
> here is the basic code:
>                 Element ele = doc.getRootElement();
>                 ele.removeAttribute("path");
>                 ele.setAttribute("path",rq.getParameter("txtPath"));
> if I remove line two then I get a bad xml file where this element has two
> attributes named path
> thanx in advance
> peter
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list