aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes (JAVA SWING)JTREE + JDOM +XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "(JAVA SWING)JTREE + JDOM +XML" Watch "(JAVA SWING)JTREE + JDOM +XML" New topic
Author

(JAVA SWING)JTREE + JDOM +XML

sekhar subbu
Greenhorn

Joined: Nov 21, 2006
Posts: 7
Hi

I need to create an GUI XML editor implemented in java swings .Basically - It should allow me to add child nodes in the displayed XML (jTree) or delete the the child nodes .It should also allow me to edit the content of a particular atrribute of the node .

my xml format is :


FOR EXAMPLE HERE I WANT TO CHANGE the value of V in subchild .






I wish to use JDOM and JAXEN - XPath for xml parsing .

After the editing the XML file , it should be saved as XML file .

Acutally i am new to java SWING programming .So i am confused abt few things.

1.After searching soem topics in forums and internet , i found that it is tough to edit the contents of nodes using jtree.

Am very new to swing ,
so I dont know which one is good or which one is bad to be used for implementation .I really appreciate if someone gives soem ideas for my implementation .

I would also welcome sample codes for the same

With thanks
Dhanya Palanisamy
Ranch Hand

Joined: Oct 20, 2006
Posts: 61
Hi,

Go thru thr Q&A in this link. http://www.cs.ualberta.ca/TechReports/2005/TR05-07/TR05-07.html
I found it useful.
sekhar subbu
Greenhorn

Joined: Nov 21, 2006
Posts: 7
Hi thanks a lot ...i found it usefull...but still i have to get practised with java swing !
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

avid coder / sekhar,

We don't have too many rules around here but we do have a Naming Policy. Please adjust your display name accordingly. You can do so by clicking here.

Thanks a bunch.
[ November 21, 2006: Message edited by: Gregg Bolinger ]

GenRocket - Experts at Building Test Data
sekhar subbu
Greenhorn

Joined: Nov 21, 2006
Posts: 7
@dhanya

i saw your post related to xml and java swing..
http://www.coderanch.com/t/128829/XML/XML-JTree



so did you finally acheieve the solution ...

i would be very happy..if you could share the code with me ...
even am trying to play with examples...

thnks

@greg...

am following your rules
Dhanya Palanisamy
Ranch Hand

Joined: Oct 20, 2006
Posts: 61
Hi sekhar.

No i haven't found the solution as i am new to Swing. But i found some similar problem to yours and solution in google groups. Try searching there once.


Dhanya.
Dhanya Palanisamy
Ranch Hand

Joined: Oct 20, 2006
Posts: 61
Hi Sekhar,

http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html#dynamic

check this, might be useful for you.
sekhar subbu
Greenhorn

Joined: Nov 21, 2006
Posts: 7
Hey dhanya

thanks a lot ..
really a useful link...
i think i have improved in java swings .
But still i dont know how to update the edited node using tree selection listener
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: (JAVA SWING)JTREE + JDOM +XML