Renaming a node in a tree

View: New views
4 Messages — Rating Filter:   Alert me  

Renaming a node in a tree

by Oliver Ruebenacker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

     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
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...

Re: Renaming a node in a tree

by Oliver Ruebenacker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

     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@...> 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@...

Re: Re: Renaming a node in a tree

by Ian Lea :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> 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@...> 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@...
>

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...

Re: Re: Renaming a node in a tree

by Oliver Ruebenacker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

     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@...> 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@...> 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@...> 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@...
>>
>



--
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@...