XML Editor

Tree view, XPath, XSLT, XSD — everything in one tool, like Altova XMLSpy.

{{ __t('tree_empty_or_invalid') }}
{{ parseError }}
{{ validateMsg }}
{{ stats.size }} {{ __t('bytes') }} {{ stats.elements }} {{ __t('elements') }} {{ stats.attributes }} {{ __t('attributes') }} {{ stats.depth }} {{ __t('depth') }} {{ stats.textNodes }} {{ __t('text_nodes') }}
{{ __t('xpath_examples_label') }}: {{ ex }}
{{ __t('input_xml_label') }}
{{ __t('xpath_result_label') }}
{{ xpathError }}
{{ __t('input_xml_label') }}
{{ __t('xslt_input_label') }}
{{ __t('xslt_output_label') }}
{{ xsltError }}
{{ __t('schema_server_note') }}
{{ __t('input_xml_label') }}
{{ __t('schema_xsd_label') }}
{{ __t('schema_valid') }}
{{ __t('schema_errors_heading') }} ({{ schemaResult.errors.length }}):
L{{ err.line }}{{ err.column ? ':' + err.column : '' }} {{ err.message }}
{{ __t('input_xml_label') }}
{{ __t('schema_generated_label') }}
{{ schemaGenError }}
{{ __t('input_xml_label') }}
{{ __t('convert_output_label') }} ({{ convertTarget.toUpperCase() }})
{{ convertError }}

What is the CalcSI XML Editor?

The CalcSI XML Editor is a free online tool inspired by Altova XMLSpy. You can edit XML documents comfortably in a fully editable tree view or as plain text — with an XPath tester, XSLT transformation, XSD validation, and automatic schema generation built in.

Editing, XPath queries, and XSLT transformations run directly in your browser. For XSD schema validation and automatic schema generation we use the libxml library on our server — fast, standards-compliant, and with no software to install.

Feature set

  • Fully editable tree view — Double-click any tag, attribute, or text to edit. Add, delete, and move nodes via inline buttons.
  • Text view — Classic editor with monospace font and instant error markers (line/column).
  • XPath tester — Run arbitrary XPath expressions against the XML, with results as nodes, strings, numbers or booleans.
  • XSLT transformation — XML + stylesheet → HTML/XML/Text. Runs directly in the browser via XSLTProcessor.
  • XSD schema validation — Real W3C-compliant validation via libxml on our server. Errors with line and column.
  • Generate XSD from XML — We analyze a sample XML and propose a matching XSD with inferred types and cardinalities.
  • Conversion — XML to JSON or CSV (for tabular XML lists).
  • Import & export — Upload a file, load from URL, download as .xml, copy to clipboard.

Common use cases

  • Inspect and fix SOAP requests/responses, B2B messages, and EDI payloads
  • Edit and validate config files (pom.xml, web.xml, applicationContext.xml)
  • Check RSS/Atom feeds and convert them to JSON if needed
  • Edit SVG files as XML — tweak attributes, paths, viewBoxes

Data and privacy

Editing, XPath queries, XSLT transformations and JSON/CSV conversion run entirely in your browser — that data never leaves your device. Only for XSD schema validation and automatic schema generation do we send the XML (together with an optional XSD) to our server, where it is processed and immediately discarded — we don't store anything.

XML in Depth: W3C Standard, Schema and XPath

XML was published as a W3C Recommendation in 1998 and, despite JSON's dominance, is still standard in many areas: SOAP web services, SEPA/ISO 20022 financial transactions, RSS/Atom feeds, SVG graphics, Office documents (DOCX, ODF), Android layouts, Maven/Gradle configs and EDI exchange. Unlike JSON, XML supports namespaces (xmlns:soap="…"), attributes on elements, mixed content (text + child nodes), comments, CDATA blocks and processing instructions. That expressiveness makes XML more powerful but also more complex.

Three W3C standards accompany XML practically every day: XSD (XML Schema Definition) describes structure, types and constraints (comparable to JSON Schema but older and stricter); XPath (currently 3.1) is a declarative query language for XML nodes, e.g. //book[author='Anna']/title; and XSLT transforms XML into HTML, other XML structures or plain text. This editor provides all three: edit in tree or text view, validate against your XSD, test XPath expressions and run XSLT transformations directly in the browser or via a server helper.

Coming from JSON, three quirks surprise people. First, the prolog — a file should start with a declaration like <?xml version="1.0" encoding="UTF-8"?>. Second, the root element: XML needs exactly one, while JSON allows any number of top-level values. Third, the split between attributes and child nodes: in XML <user id="42">Anna</user>, the ID and the name exist on different "levels" — when converting to JSON this typically appears as {"id":"42","#text":"Anna"} or with a prefix like @_id.

How to Use the XML Editor

Five concrete workflows cover the most common tasks:

  1. Inspect and edit XML: paste the document into text mode or load a file. Switch to tree mode to see elements, attributes and comments in structured form. Clicking a node lets you rename, add a child or delete.
  2. Find nodes via XPath: in the XPath tab enter e.g. //book[price < 20]/title to list all book titles under 20 EUR. The tester uses the browser's native document.evaluate (XPath 1.0) and returns hits with their path context.
  3. Validate XSD: load your schema into the XSD field or auto-generate one from the current XML. The server helper returns a list of concrete errors with line numbers (Element 'price' is not allowed here), highlighted in the editor.
  4. Transform with XSLT: paste a stylesheet and turn the XML into an HTML report, another XML structure or plain text. Classic use case: render SEPA XML as a human-readable list.
  5. Convert to JSON/CSV: via the Convert tab the editor maps XML using fast-xml-parser into a JSON representation. Attributes are prefixed with @_, text nodes appear as #text — the standard convention for downstream processing.

Real-World Examples

These typical XML scenarios occur every day:

  • Minimal XML prolog: <?xml version="1.0" encoding="UTF-8"?><root><item id="1">Anna</item></root> — a complete well-formed document with an encoding hint.
  • XPath filter: from a bookstore XML, //book[@category='fiction']/title/text() returns every fiction book's title. The text() function extracts pure text nodes.
  • Attribute vs. element: <user id="42">Anna</user> turns into JSON {"@_id":"42","#text":"Anna"}. On a XML→JSON→XML round trip the builder needs to know which fields used to be attributes.
  • CDATA block: <script><![CDATA[ if (a < b) doStuff(); ]]></script> preserves raw text containing < characters without parsing them as tags — important for SOAP payloads with embedded code.
  • Namespace: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">. The prefix soap: references the declared URI; XPath queries must use local-name() or register the namespace.

Limits, Edge Cases and Security

XML has classic foot-guns that hit production regularly. First: XXE (XML External Entity). An attacker injects <!DOCTYPE foo [<!ENTITY xxe SYSTEM "file:///etc/passwd">]><foo>&xxe;</foo> — a naively configured parser reads the file and returns it. Best practice: disable DTDs and external entities (libxml2 LIBXML_NONET | LIBXML_NOENT off, Java setFeature("http://apache.org/xml/features/disallow-doctype-decl", true)). Second: Billion laughs / XML bomb. Nested entities (&lol1; → &lol2; → ...) explode a 1 KB document into gigabytes — disabling entity expansion helps here too. Third: namespace hell. SOAP and SAML documents juggle multiple namespaces simultaneously; XPath 1.0 (browser default) requires registered namespace resolvers, otherwise queries return empty. Workaround: local-name() or an XPath 2/3.1 library. Fourth: encoding trap. The XML prolog declares the encoding (encoding="UTF-8"); if that does not match the actual charset, the parse fails with "invalid character". Normalize legacy data with iconv first. Fifth: JSON round trip is not lossless. XML has concepts (mixed content, sibling order, processing instructions) JSON cannot represent. <p>Hello <b>World</b> ok?</p> becomes a creative approximation in JSON.

Frequently Asked Questions about the XML Editor

What is the difference between well-formed and valid XML?
Well-formed only means: the syntax is right — single root element, properly closed tags, escaped special characters. Valid additionally means: the document conforms to an XSD or DTD schema — order, required fields, types and values. The editor checks both separately — text parse for well-formed, the XSD tab for valid.
How do I write XPath for elements in a namespace?
In the browser (XPath 1.0) there are two routes: pass a namespace resolver, or fall back to local-name(): //*[local-name()='Envelope']/*[local-name()='Body']. For SOAP/SAML debugging the local-name() variant is pragmatic because it works without resolver setup.
What is XXE and why is it dangerous?
XML External Entity injection lets an attacker read server files, trigger internal network requests or freeze the parser via a <!DOCTYPE> block. Mitigations: disable DTDs and entities in the parser, never set libxml_disable_entity_loader(false), keep FEATURE_SECURE_PROCESSING active in Java. OWASP lists XXE in its Top 10.
Can I use XSLT 3.0 or XPath 3.1 here?
Browsers natively support XSLT 1.0 and XPath 1.0. For XSLT/XPath 3.x you need Saxon-JS or server-side Saxon. The editor uses the browser default; for more complex transformations with higher-order functions or xsl:try we recommend Saxon-HE in a build pipeline.
How do I convert XML to JSON losslessly?
Strictly speaking it is impossible — XML has mixed content, attributes, sibling order and processing instructions, JSON does not. Pragmatically, fast-xml-parser uses conventions: @_ prefix for attributes, #text for text. On the way back the builder must follow the same conventions, otherwise attributes wrongly become children.
Are my XML data sent to your server?
Editing, XPath, XSLT and JSON/CSV conversion run locally in the browser — nothing is sent. Only the optional features XSD validation and XSD generation use a server helper (libxml2), because browsers cannot do this natively. The data is processed there and immediately discarded, nothing is stored.

Related Tools

  • JSON Editor — Tree view, schema validation and JSONPath/JMESPath queries — the counterpart to XML in modern API stacks.
  • JSON Formatter — Quick beautify and minify after XML → JSON conversion.
  • YAML ↔ JSON Converter — Swap YAML and JSON notation for configs beyond the classic XML world.