Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to display an xml file in a panel?  RSS feed

 
cindy sung
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
How can I display an xml file with JFC? And the look and feel is best to be the same as what would be shown by internet explorer. The expansion functionality can be omitted.
Is there any simple method rather than writing an XSL?
Thanks.
cindy
 
Ed Tidwell
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want everything to show?
I basically did my own JTree renderer for this so I could tweak my Icons.
The only problem here was I knew what was in the tree on how deep the nodes went.
This allowed me to filter items in the XML tree that drove the behavior of the application.
Getting the look and feel of IE will require some work. Just think about the font types and colors you have to set along the way as you go.
If you want everything to show can't you just use JDOM to get an iterator of the root node and rip threw the thing adding it as you go?
Hopefully I've told you something you didn't already know.

Ed
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!