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.