• Post Reply Bookmark Topic Watch Topic
  • New Topic

Display xml file in Pane  RSS feed

 
Thomas Greene
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a properties file from which i retreive values and display in JEditorPane.

Now instead of properties file i want to use a xml file(which uses a xsl file). How do i mention it here. If i do something like


it displays "text.xml" in the editor and not its contents.
 
Petr Blahos
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Thomas,

Well, why do you think it should display the contents?
Have a look at JEditorPane javadoc. As to 1.4.2 it only
supports html, rtf and txt. You are not exactly specifying
if you want to display the xml source or what? If it is
the source, display it as text/plain. If you want to see
the html (or whatever) after the xslt you are not displaying
the xml but something different. Then you have to do
the transformation first and then display the result.

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