displaying a XML file in JEditorPane
I want to display a regular XML or any other file in text format in JEditorPane..I don't w开发者_高级运维ant to display the content in html page... the content should be exactly the same as in file with line break..the XML file is located on local system
Do you need syntax highlighting? or just show plain text?
If syntax try to use this http://java-sl.com/xml_editor_kit.html
If not just use JTextArea or normal JEditorPane with default editor kit. And call setText() to set your content.
精彩评论