aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How can i Convert Java JTree Object to XML Format ?? :: Need your valuable suggestions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How can i Convert Java JTree Object to XML Format ?? :: Need your valuable suggestions" Watch "How can i Convert Java JTree Object to XML Format ?? :: Need your valuable suggestions" New topic
Author

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

Kranthi Poturaju
Greenhorn

Joined: Feb 25, 2010
Posts: 4

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

Joined: Jul 26, 2007
Posts: 10377
    
    8

King Kranthi wrote:

Please check your private messages for an important administrative matter


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10377
    
    8

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

Joined: Jul 26, 2007
Posts: 10377
    
    8

Coming back to your question, did you check out xstream as was suggested in the other thread?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can i Convert Java JTree Object to XML Format ?? :: Need your valuable suggestions