I
really like Altova's XMLSpy utility for browsing XML, creating XSDs and testing XPath queries. However Altova's licensing model has made it difficult for me to use the tool.

The Altova licensing model is based on purchase plus annual support. If the annual support isn't renewed, then you lose access to the utility, and there are frequent updates that require re-installation of the tool.

Where I work now, there is a purchase authorization process for software tools and it's a little bit onerous. I had submitted the paperwork to purchase XMLSpy, and two years of renewals had been approved. This year, when the annual support expired, I decided not to bother, although XMLSpy is a useful tool.

After some searching I landed on two good free options: Eclipse with an XPath plugin for a full IDE experience, and VS Code with the Red Hat XML extension for a lighter-weight approach.

Option 1: Eclipse with the XPath Tools plugin

Eclipse is not as sophisticated as XMLSpy, but it handles the basics well and it's free.

Here is what Eclipse can do for XML work:

  • Syntax highlighting and formatting
  • Well-formedness validation
  • Schema-aware validation (with an XSD present in the project)
  • XPath 1.0 and 2.0 queries via the XPath Tools plugin
  • Side-by-side tree and source views
  • Content assist when editing XML against a known schema

There are XMLSpy features that Eclipse does not match. The main ones:

  1. Graphical XSD designer (Eclipse shows XSDs as text only)
  2. XSLT construction and testing with a debugger
  3. WSDL/SOAP support
  4. JSON editing and schema generation
  5. Database-driven XML import/export wizards

For most day-to-day XML editing and XPath work, Eclipse covers it.

Installing Eclipse

  1. Download and install a Java runtime. Modern Eclipse (2022 and later) requires Java 17 or higher — Java 21 LTS is a good choice. Download it from https://adoptium.net/ (Eclipse Temurin builds are free and open source).

  2. Download Eclipse from the main downloads page: https://www.eclipse.org/downloads/. The Eclipse IDE for Java Developers package is a fine starting point — it includes the XML editor out of the box.

  3. Install the XPath Tools plugin:

    1. Help → Eclipse Marketplace
    2. Search for XPath Tools
    3. Install the result by Matthias Blank
    4. Restart Eclipse when prompted
  4. Open the XPath query view:

    1. Open an XML file in the editor
    2. Window → Show View → Other
    3. Expand the XML category and select XPath
    4. The XPath view docks at the bottom of the workbench

    With an XML file open in the editor, type an XPath expression in the XPath view and press Enter. Matching nodes are highlighted in the editor and listed in the results pane below.

Option 2: VS Code with the XML extension

If you already use VS Code, it is worth considering as an XML editor. The XML extension published by Red Hat (extension ID redhat.vscode-xml) adds schema-aware editing, formatting, and validation. A separate extension called XPath Notebooks adds an interactive XPath query scratchpad.

To get set up:

  1. Open VS Code and go to the Extensions panel (Ctrl+Shift+X)
  2. Search for XML and install the one published by Red Hat
  3. Optionally search for XPath Notebooks for interactive XPath queries

The Red Hat XML extension automatically detects associated schemas (via xsi:schemaLocation or a matching .xsd file) and provides content assist, hover documentation, and inline validation errors. For straightforward XML editing and navigation it is faster to start up than Eclipse.

Lightweight option: XML Notepad

If you just need to browse and edit XML documents without writing XPath queries, Microsoft's XML Notepad is a free Windows tool that shows a clean two-pane tree/value view and supports find-by-XPath for basic searches. It is much lighter than Eclipse and installs in seconds. Search "XML Notepad Microsoft" to find the current release on GitHub.

Happy XML editing!