File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Transform DOM to JTree Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Transform DOM to JTree" Watch "Transform DOM to JTree" New topic

Transform DOM to JTree

m pap

Joined: Jun 13, 2001
Posts: 13
I have been trying to days now to figure out how to output a JTree from a DOM document. The implementation of this can not be specific. I want to be able to take any DOM document not knowing its values and output a JTree. Can anyone help, it is REALLY needed.
Thank you in advance, mpap
aude tantot
Ranch Hand

Joined: May 21, 2001
Posts: 39
the DOMEcho examples in the java tutorial do that.
m pap

Joined: Jun 13, 2001
Posts: 13
I know but in the DomEcho it converts a DOM to JTree knowing the element values. What if you dont know them. You can not make an array of element names you just want it to be a generic method so that you can use it to make any tree conversion.
Thanks, m pap

I agree. Here's the link:
subject: Transform DOM to JTree
It's not a secret anymore!