How to make XML files always open in the text editor rather than the XML editor?

XmlEclipseEditor

Xml Problem Overview


I went to file associations there was no .xml format, when I added it, all editors were added automatically and they are static writing me something like:

locked by 'XML' content type

...can't remove association.

I want that whenever I create an XML file, it would be opened automatically with the text editor.

Please help.

Xml Solutions


Solution 1 - Xml

enter image description here

Click default on *.xml and Text editor

Close all files and then try to open an XML file again.

Solution 2 - Xml

My problem was that I opened the pom.xml with the maven editor - I wanted it to be opened with the maven editor but to open in the "source" view - achieved it by:

enter image description here

Typing xml in the search box did not include this page in the results.

Solution 3 - Xml

For people who are looking for a simple text based XML editor, the default XML editor in Eclipse comes with a text based view with syntax highlighting (as it should). It's just not intuitive to know this view exists.

  • After you open the file with "XML Editor" the text view can be toggled by clicking on the "Source" tab on the bar just below the file.

By default the view is "Design". "Source" is the simple text based view with syntax highlighting.

For a much better illustration, see:

https://stackoverflow.com/questions/4590119/how-do-i-view-xml-in-eclipse-with-simple-syntax-highlighting

Solution 4 - Xml

In eclipse IDE,right click the xml file and click openwith then click generic text editor

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAubergineView Question on Stackoverflow
Solution 1 - Xmluser591593View Answer on Stackoverflow
Solution 2 - XmlMr_and_Mrs_DView Answer on Stackoverflow
Solution 3 - XmlmGammaView Answer on Stackoverflow
Solution 4 - XmlMohamed MSView Answer on Stackoverflow