7 Best XML Editors for Linux in 2026 (GUI & Terminal)

Linux has no default XML editor worth using for serious work. Gedit and Kate open XML files but lack XSD validation, XPath support, and schema-aware autocomplete.
VS Code with Red Hat XML extension is the best choice. XSD validation, XPath queries, and schema-aware autocomplete. xmllint in the terminal is essential for validation in scripts and CI pipelines.
Two types of developers need XML editors. The first group edits config files, data exports, and SVG as plain text. They need syntax highlighting and formatting. The second group does serious XML work with XSD schemas, XPath queries, and XSLT transforms. They need real-time validation and debugging tools.
This guide covers seven XML editors for Linux with command-line tools, GUI editors, and professional options.
1. VS Code with Red Hat XML Extension
Best for most Linux developers doing XSD validation and schema work

This is the main recommendation for most Linux developers working with XML in 2026. VS Code itself has basic XML syntax highlighting but nothing else. The Red Hat XML extension adds the real capabilities.
What you get:
- XSD and DTD validation with real-time error squiggles
- Schema-aware autocomplete (suggests valid child elements and attributes)
- XPath 1.0 evaluation in command palette
- XSLT support for running transforms
- Format on save
- Integrated terminal, Git integration
What you don't get:
- Lightweight memory footprint (300-400MB at idle, Electron-based)
- Visual schema designers
- XSLT debugger with step-through
Install options matter on Linux. The .deb package from the VS Code website is more reliable on Ubuntu and Debian than the Snap version. On Fedora use the .rpm package. After installing VS Code, install the Red Hat XML extension from the extensions marketplace.
Schema association is what most Linux developers struggle with. In your settings.json add the xml.schemas array with fileMatch and url keys pointing to your local XSD file. The exact structure looks like this:
"xml.schemas": [
{
"fileMatch": ["config/*.xml"],
"url": "/home/username/schemas/config.xsd"
}
]Once the schema is associated, VS Code validates every file matching that pattern automatically. You see red squiggles under invalid elements as you type. The xml.validation.enabled setting controls whether validation runs. Set it to true in settings.json if validation is not working. The Red Hat extension is better than the generic XML Tools extension for validation work because it uses the lemminx language server which has full XSD 1.1 support and better error messages.
The limitation is memory footprint. VS Code is an Electron app. On low-RAM Linux machines under 4GB the memory footprint of 300-400MB at idle can be a real problem. For those systems Geany or Kate is a better choice.
Download: VS Code for Linux
2. oXygen XML Editor
Best for professional XML authoring, DITA documentation, and XSLT debugging

The professional choice for Linux developers whose job involves XML as the primary deliverable.
What you get:
- XSLT debugger with step-through execution
- XQuery execution environment for XML databases
- Built-in XSD and DTD authoring with visual schema designer
- DITA publishing support (PDF and HTML5 output)
- XML refactoring tools for renaming elements across hundreds of files
- Full XSD 1.1 support
- 30-day free trial with all features
What you don't get:
- Free version (named user license around $299)
- Lightweight footprint (requires Java 11 or later)
Download the Linux installer from oxygenxml.com as a .sh file. Run with bash oxygen-xml-editor-installer.sh. For daily professional XML authoring the cost is justified.
Who specifically needs oXygen on Linux: technical writers working with DITA documentation systems where the DITA Open Toolkit integration saves hours of manual work, developers doing complex XSLT transforms where debugging matters because stepping through template execution is the only way to understand what is happening, enterprise Java teams working with JAXB and XMLBeans where the schema designer generates Java classes directly, anyone whose job involves XML schemas as the primary deliverable not just as a validation tool.
Pricing is the main barrier. Named user license around $299 with a 30-day free trial. The academic license option is heavily discounted for students and researchers at around $99. For occasional XML work twice a month VS Code with the Red Hat extension is a better choice. For daily professional XML authoring the cost is justified.
Download: oXygen XML Editor
3. xmllint (terminal)
Best for validation in scripts, CI pipelines, and pre-commit hooks

Not a GUI editor but essential context. Every serious Linux XML workflow uses xmllint regardless of which editor the developer prefers.
What you get:
- Pretty printing: xmllint --format file.xml
- XSD validation: xmllint --schema schema.xsd --noout file.xml
- DTD validation: xmllint --valid --noout file.xml
- XPath queries: xmllint --xpath "//product[@id='123']/name/text()" catalog.xml
- Scriptable (exit code 0 on success, non-zero on failure)
- CI pipeline integration
What you don't get:
- GUI or interactive editing
- Real-time validation as you type
Install: apt install libxml2-utils on Ubuntu, dnf install libxml2 on Fedora, pacman -S libxml2 on Arch.
Integrate xmllint into a pre-commit hook so XML files are validated before every git commit. Create .git/hooks/pre-commit with this content:
#!/bin/bash
for file in $(git diff --cached --name-only | grep '\.xml$'); do
xmllint --schema schema.xsd --noout "$file"
if [ $? -ne 0 ]; then
echo "XML validation failed for $file"
exit 1
fi
doneMake it executable with chmod +x .git/hooks/pre-commit. Now invalid XML files cannot be committed. The exit code behavior is critical for CI integration. Exit code 0 means valid, non-zero means invalid or error.
The limitation is no GUI and no interactive editing. xmllint is a tool for validation and transformation in scripts, not for authoring.
Install guide: xmllint Installation and Usage Guide
4. Geany
Best for fast editing of XML config files and data exports without schema validation

apt install geany on Ubuntu or dnf install geany on Fedora.
What you get:
- Fast startup (under one second)
- XML syntax highlighting with tag auto-close
- Code folding to collapse large XML structures
- Built-in terminal panel (run xmllint without leaving editor)
- Split view for side-by-side XML files
- Lightweight memory footprint
- Completely free
What you don't get:
- XSD validation (no schema understanding)
- XPath support
- XSLT transforms
- Schema-aware autocomplete
The built-in terminal plus Geany combination lets you write XML in the editor and validate with xmllint in the panel below. Good for editing XML config files like Maven pom.xml or Spring applicationContext.xml where no schema validation is needed during editing.
Download: Geany Text Editor
5. Kate
Best for KDE Plasma users who want native Qt performance with LSP validation

KDE's text editor. apt install kate on Ubuntu, pacman -S kate on Arch, pre-installed on KDE Plasma desktops.
What you get:
- Native Qt performance (lower memory ~150MB)
- LSP client support for xml-language-server
- Built-in terminal panel
- Project management with cross-file search
- Code folding and structure view
- Pre-installed on KDE Plasma
- Completely free
What you don't get:
- Easy setup (LSP requires 10-15 min configuration)
- Lightweight on GNOME (pulls 150-200MB Qt dependencies)
- Out-of-box validation (requires npm package install)
Kate in 2026 has LSP client support which means you can connect it to a running xml-language-server instance for validation and autocomplete that approaches VS Code's Red Hat extension capability.
The LSP setup for XML in Kate takes 10-15 minutes once. Install vscode-langservers-extracted via npm: npm install -g vscode-langservers-extracted. Configure Kate's LSP client settings by opening Settings > Configure Kate > LSP Client > User Server Settings.
Who this is for: KDE Plasma users who want a native Qt application rather than an Electron app. Kate is pre-installed, fast, and with the LSP setup it handles most XML validation needs.
Download: Kate Text Editor
6. Emacs with nxml-mode
Best for Emacs users who need real-time RelaxNG validation as they type

nxml-mode is built into GNU Emacs and provides real-time RelaxNG validation as you type.
What you get:
- Real-time validation (instant feedback as you type)
- RelaxNG schema support
- Schema-aware autocomplete (C-RET for valid elements)
- Built into Emacs (no installation needed)
- Fastest validation feedback on Linux
- Completely free
What you don't get:
- XSD schema support (RelaxNG only, requires conversion)
- XPath queries
- XSLT transforms
- Easy learning curve (Emacs expertise required)
Unlike most editors where validation runs on save, nxml-mode validates continuously and highlights invalid elements immediately when you type something that violates the schema. This is genuinely the best real-time validation experience on Linux for developers who use Emacs.
Install: apt install emacs on Ubuntu. nxml-mode activates automatically for .xml files. To add RelaxNG schema validation, set the schema location with M-x customize-variable then nxml-where-find-schemas.
Who this is for: Emacs users already in the ecosystem. If you are not already an Emacs user the learning investment needed to use nxml-mode effectively makes it the wrong choice compared to VS Code.
Download: GNU Emacs
7. Neovim with xml-language-server
Best for terminal-first developers who live in Neovim

For terminal-first Linux developers who already use Neovim.
What you get:
- Full XSD 1.1 support (same as VS Code)
- Schema-aware autocomplete
- Real-time validation as you type
- Terminal-based workflow
- Standard LSP keybindings (gd, K, ]d, [d)
- No GUI context switching
- Completely free
What you don't get:
- Easy setup (requires nvim-lspconfig already configured)
- Beginner-friendly (Neovim expertise required)
- Visual interface
- Quick onboarding
Install xml-language-server via Mason inside Neovim with the command :MasonInstall lemminx. lemminx is the same language server that powers the Red Hat XML extension in VS Code, so you get identical validation and autocomplete capability in Neovim.
Configure in your Neovim LSP setup file by adding lemminx to your lspconfig servers. If you use nvim-lspconfig add this to your init.lua:
require('lspconfig').lemminx.setup{}Who this is for: Linux developers who live in the terminal and run Neovim as their primary editor. Getting lemminx through Mason takes five minutes and gives you full schema-aware XML editing without touching a GUI editor.
Download: Neovim
Extension Comparison
Which XML Editor Should You Actually Use on Linux?
For most Linux developers doing occasional XML work: VS Code with the Red Hat XML extension. Free, covers XSD validation and XPath, works on every distro. The schema association setup takes 10 minutes once and then validation is automatic.
For terminal-first workflows: xmllint for validation in scripts plus Neovim with lemminx for editing. This combination covers everything without leaving the terminal.
For KDE Plasma users: Kate with LSP configured. Native Qt performance, lower memory footprint than VS Code, and full validation capability once the xml-language-server is connected.
For professional XML authoring, DITA, or XSLT debugging: oXygen XML Editor. The cost is justified if XML is your primary work. The XSLT debugger alone saves hours on complex transforms.
For quick edits of XML config files without validation: Geany. Fast startup, built-in terminal for running xmllint manually when needed.
If you are looking for more XML tools, check out our guide on the best XML editor for VSCode for detailed VS Code extension comparisons. Mac users can see our best XML editor for Mac article for platform-specific recommendations. For mobile editing, check out the best XML editor for Android.
Frequently Asked Questions
What is the best free XML editor for Linux?
VS Code with the Red Hat XML extension is the best free XML editor for Linux in 2026. It provides XSD validation, schema-aware autocomplete, XPath 1.0 support, and XSLT transforms. Install the .deb package on Ubuntu or the .rpm on Fedora for better file system access than the Snap version. The Red Hat XML extension is free in the VS Code marketplace.
How do I validate XML against an XSD schema on Linux?
Use xmllint from the command line: xmllint --schema schema.xsd --noout file.xml. Install with apt install libxml2-utils on Ubuntu. The command exits with code 0 if valid and non-zero if invalid, making it scriptable in CI pipelines. For GUI validation use VS Code with the Red Hat XML extension and configure schema association in settings.json.
Does VS Code support XML validation and editing on Linux?
Yes, VS Code supports XML validation and editing on Linux through the Red Hat XML extension. Install VS Code from the .deb or .rpm package, then install the Red Hat XML extension from the marketplace. Configure schema association in settings.json using the xml.schemas array with fileMatch and url keys. Validation runs in real-time as you type with error squiggles under invalid elements.
How do I format and pretty print an XML file on Linux?
Use xmllint: xmllint --format file.xml > formatted.xml. This reformats the XML with proper indentation and line breaks. For in-editor formatting use VS Code with the Red Hat XML extension and enable format on save, or use Kate with the xml-language-server LSP which provides formatting through the language server. Geany has a built-in XML formatter under Tools > Reformat.
Related Reading
If you're working with other file formats or need to compare tools across different platforms, these guides help:
Need to work with XML files? Use the XML merger tool to combine multiple XML files or the XML file splitter to split large XML files.
Read More
All Articles
9 Best XML Editors for Windows in 2026 (Free & Tested)
Compare the best XML editors for Windows, including VS Code, Notepad++, XML Notepad, and Oxygen for validation, schema support, and large files.

9 Best XML Editors for Mac in 2026 (Free & Tested)
Compare the best XML editors for Mac, including VS Code, BBEdit, Oxygen, and command-line tools for validation, XPath, and large XML files.

5 Best XML Plugins for Notepad++ in 2026 (Tested & Ranked)
Compare 5 best XML plugins for Notepad++ with formatting, validation, and XPath tools. Includes XML Tools, Tidy2, and specialized plugins for Windows XML editing.