XML file format: what it is and how to use it
XML is the extensible markup language: self-describing tagged data with schemas and namespaces that powered a decade of enterprise systems and still underlies half the world's formats. Learn when to use it and what to choose instead.
-
No uploadsFiles stay on your device
-
Batch processingHandle multiple files at once
-
100% privateNo sign-up, no tracking
What is a XML file?
An .xml file is data in Extensible Markup Language, the W3C's 1998 self-describing tagged format: elements, attributes and text in a well-formed tree, optionally validated against DTDs and XSD schemas, namespaced and transformable via XSLT. It lost the API war to JSON but quietly remains the substrate of half the formats you use: SVG, DOCX, XLSX, EPUB and RSS are all XML underneath.
When should you use XML?
- Document-shaped data: mixed content where text and markup intertwine.
- Schema-driven systems: contracts, validation and enterprise integration.
- Formats built on it: SVG, OOXML office files, RSS feeds, Android manifests.
When is another format a better fit?
For data interchange and APIs, JSON is lighter and maps to native structures. For configs YAML/TOML; for tables CSV. XML's strengths, namely schemas, namespaces and mixed content, matter in the document world, less in the data world.
The short version: XML is the verbose elder of structured data: displaced by JSON for APIs, but still the skeleton under countless formats.
How to open a XML file
On Windows
Double-click the file, or open it with Any text editor.
On macOS
VS Code opens XML files on macOS.
In your browser
Open XML files right in a browser tab or with the dexrr viewer. No install, no upload.
Also opens in
-
Any text editor
-
Any web browser
-
VS Code
View or convert XML files
A quick preview or a new format. No install, no upload.
XML technical details
- Full name
- eXtensible Markup Language
- Extensions
- .xml
- MIME type
-
application/xml, text/xml - Magic bytes
-
3C 3F 78 6D 6C (<?xml) - Compression
- None (uncompressed)
- Developer
- W3C
- Specification
- www.w3.org
XML questions, answered
How do I open a .xml file?
Any text editor, IDE or browser shows it; dedicated XML tools validate and transform it. dexrr displays and converts xml files directly in your browser.
Can I convert XML files online?
Yes, dexrr converts xml locally in your browser: XML to JSON for data pipelines or XML to CSV for flat exports.
Is XML better than JSON?
For document markup and schema-validated systems, XML's features are real. For APIs and data exchange, JSON is lighter and native to every language. The war ended in a stalemate of different domains.
Why does my XML file start with <?xml version...?
That is the prolog declaring version and encoding, required-looking boilerplate that tools expect, even though it is technically optional.
Is the XML format outdated?
As an API format, largely superseded by JSON. As a foundation under SVG, Office files and feeds, it is more embedded than ever.