• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can i Convert Java JTree Object to XML Format ?? :: Need your valuable suggestions

 
Kranthi Poturaju
Greenhorn
Posts: 4
IBM DB2 Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,

I am King here. I am new to Java Swing programming.

I got new task in my company. Here, i need to generate a dynamic XML file from Editable JTree.

I have successfully coded for editable JTree. In this tree we can add and delete new nodes. Means, the number of elements will vary from user to user. User will create their own customized tree according to their requirements.

I tried XStream also. It is working for normal class Objects only. Not for JTree object. It is generating XML also. But, not according to Tree structure, according to the JTree classes hierarchy.

If they click on GenerateXML, we need to generate an XML file according to the tree structure. I am new to swing programming. So, can any one help me for this please............

my Existing code is as follows:
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
King Kranthi wrote:

Please check your private messages for an important administrative matter
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch,

I have edited out your post in the other thread. Please do not hijack other people's threads. More details here
In future while posting code, please code tags
More tips on getting the most of the Ranch can be found here
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Coming back to your question, did you check out xstream as was suggested in the other thread?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic