[jdom-interest] Re: Renaming a node in a tree

Oliver Ruebenacker curoli at gmail.com
Tue Jul 28 08:13:49 PDT 2009


     Hello Ian,

  Oops, sorry, it seems to work in fact.

  My code behaved as if it did not work, and then I searched the web
and found some messages that seemed to suggest that setName() should
not be used, so I thought the intended way to modify a tree was
another one.

     Take care
     Oliver

On Tue, Jul 28, 2009 at 7:28 AM, Ian Lea<ian.lea at gmail.com> wrote:
> Element a = whatever
> Element b = a.getChild("b");
> b.setName("e");
>
> should work, even in old versions.  What makes you think this doesn't work?
>
>
> --
> Ian.
>
>
> On Sun, Jul 26, 2009 at 12:59 AM, Oliver Ruebenacker<curoli at gmail.com> wrote:
>>     Hello, All,
>>
>>  I should add, I am using an old version, something like 0.9 beta
>> release candidate 2. I'm part of a team who is concerned upgrading
>> would break stuff.
>>
>>  Basically, how would you go from:
>>
>>  <a><b><c></c><d></d></b></a>
>>
>>  to
>>
>>  <a><e><c></c><d></d></e></a>
>>
>>  Thanks!
>>
>>     Take care
>>     Oliver
>>
>> On Sat, Jul 25, 2009 at 7:16 PM, Oliver Ruebenacker<curoli at gmail.com> wrote:
>>>     Hello, All,
>>>
>>>  Maybe I am missing the obvious, but how can I change the name, name
>>> space and prefix of a node in a tree? The obvious setName and
>>> setNamespace don't work. Thanks!
>>>
>>>     Take care
>>>     Oliver
>>>
>>> --
>>> Oliver Ruebenacker, Computational Cell Biologist
>>> BioPAX Integration at Virtual Cell (http://vcell.org/biopax)
>>> Center for Cell Analysis and Modeling
>>> http://www.oliver.curiousworld.org
>>>
>>
>>
>>
>> --
>> Oliver Ruebenacker, Computational Cell Biologist
>> BioPAX Integration at Virtual Cell (http://vcell.org/biopax)
>> Center for Cell Analysis and Modeling
>> http://www.oliver.curiousworld.org
>>
>> _______________________________________________
>> To control your jdom-interest membership:
>> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
>>
>



-- 
Oliver Ruebenacker, Computational Cell Biologist
BioPAX Integration at Virtual Cell (http://vcell.org/biopax)
Center for Cell Analysis and Modeling
http://www.oliver.curiousworld.org



More information about the jdom-interest mailing list