aspose file tools
The moose likes Swing / AWT / SWT and the fly likes How to update changes made in JTree to xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "How to update changes made in JTree to xml file" Watch "How to update changes made in JTree to xml file" New topic
Author

How to update changes made in JTree to xml file

Krithika Beri
Ranch Hand

Joined: Sep 11, 2012
Posts: 36
Hello,
I have a xml file which i am parsing using a dom parser and displaying as a JTree. Now I want that if any changes are made in the JTree, the changes should get updated to the xml. Please help
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19232

Check out TreeModelListener. Note that all changes to any nodes must go through the model. That means, for example, that when you modify a DefaultMutableTreeNode that's part of a DefaultTreeModel, you call nodeChanged on that model afterwards.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to update changes made in JTree to xml file
 
Similar Threads
JTree - Making it editable
XML to DOM to JTree
Associating JTree to Document
JTree
Jtree DND - Database