A
arun.hallan
I am using a JTree to output an XML file through dom.
What i want to do is as i create every node, i want to save the
corresponding element to that node (using setUserObject - so its hidden
in the node). I can do this fine.
The trouble is when i want to output the tree back to a DOM. When i try
to add the element from each node in the tree, i get an error saying
the element has already got a parent.
I see no way of removing a parent from each element, and have tried
just adding the root element but that hasnt worked.
Does anyone know how i can remove a parent from an element, so i can
add this element to another parent element??
What i want to do is as i create every node, i want to save the
corresponding element to that node (using setUserObject - so its hidden
in the node). I can do this fine.
The trouble is when i want to output the tree back to a DOM. When i try
to add the element from each node in the tree, i get an error saying
the element has already got a parent.
I see no way of removing a parent from each element, and have tried
just adding the root element but that hasnt worked.
Does anyone know how i can remove a parent from an element, so i can
add this element to another parent element??