Display XML file in JEditorPane

I want to display plain XML or any other file in text format in JEditorPane. I do not want to display the content on the html page ... the content should be exactly the same as in the line break file. XML file is located on the local system

+1
source share
1 answer

Do you need syntax highlighting? or just show plain text?

If the syntax tries to use this http://java-sl.com/xml_editor_kit.html

If you are not just using JTextArea or a regular JEditorPane with a standard set of editors. And call setText () to set your content.

+1
source

Source: https://habr.com/ru/post/1436041/


All Articles