Tree Structure

Hi ,I am new to Swing. I need some ideas to proceed with my project.I have an xml file I need to parse it and represent as a tree structure.The user can add delete nodes in the tree and save to an xml file.Any ideas are greatly appreciated.Thanks,SS
[291 byte] By [Sabi@Suna] at [2007-11-26 12:20:32]
# 1
Is this related to: http://forum.java.sun.com/thread.jspa?threadID=5114754&messageID=9391880#9391880
zadoka at 2007-7-7 15:10:47 > top of Java-index,Archived Forums,Socket Programming...
# 2
YES
Sabi@Suna at 2007-7-7 15:10:47 > top of Java-index,Archived Forums,Socket Programming...
# 3
I used the book by Elliotte Rusty Harold on Java/XML to learn how to do this. It is also free as an online download.Anil
anilp1a at 2007-7-7 15:10:47 > top of Java-index,Archived Forums,Socket Programming...
# 4
Thanks Anil ,I'll go through that.SS...
Sabi@Suna at 2007-7-7 15:10:47 > top of Java-index,Archived Forums,Socket Programming...
# 5
I used SAX. Perhaps you can try DOM and create a JTree more easily,when you read thru the XML file, (the book has clear details).
anilp1a at 2007-7-7 15:10:47 > top of Java-index,Archived Forums,Socket Programming...
# 6
I'am aware of parsing XML thru DOM but not creating JTree and saving to xml after the user makes changes.But thanks the book will be useful to me for saving to xml.SS...
Sabi@Suna at 2007-7-7 15:10:47 > top of Java-index,Archived Forums,Socket Programming...
# 7

> I'am aware of parsing XML thru DOM but not creating

> JTree and saving to xml after the user makes

> changes.

>

> But thanks the book will be useful to me for saving

> to xml.

>

> SS...

http://www.cafeconleche.org/books/xmljava/

While you are parsing the XML file (in SAX), create the JTree nodes where relevant.

Similarly, traverse the JTree and save to XML file.

-

Anil

anilp1a at 2007-7-7 15:10:47 > top of Java-index,Archived Forums,Socket Programming...
# 8
do u have a sample code for this
sia0001a at 2007-7-7 15:10:47 > top of Java-index,Archived Forums,Socket Programming...