How can I display an XML Document in a JEditorPane?
Please look into the
for how to build an editor kit and the parser.
I think SAX XML parser (call back based) may work better. HTMLEditor kit is based on a callback parser. SAX works better because the javax.swing.text already has it's own object model (javax.swing.text.Document interfaces and javax.swing.text.StyledDocument class). This however does not mean you cannot use DOM parser, only thing is you will have to do more work to integrate DOM (document object model) into the text packages view system.