XML

Definition

eXtensible Markup Language - a markup language for storing and transporting structured data. Like HTML but designed for data instead of web pages.

Use Cases

Frequently Asked Questions

What's the difference between XML and JSON?
XML and JSON both represent structured data. XML uses tags and attributes (for example, <order><id>1</id></order>) and supports namespaces and schema-based validation (XSD). JSON uses key-value pairs and arrays (for example, {"order":{"id":1}}) and is usually smaller and simpler for web APIs. XML is common in legacy enterprise integrations and SOAP; JSON is common in modern REST APIs.
When should I use XML?
Use XML when you need strong document structure, namespaces, or formal schema validation (XSD), or when integrating with systems that require XML (for example, SOAP services, many B2B/enterprise integrations, and some industry standards). Choose JSON for lightweight REST APIs and browser/mobile-first applications unless a partner or standard requires XML.
How much does XML cost?
XML itself is free to use; it’s an open standard. Costs come from the tools and infrastructure you use to store, process, validate, and transmit XML—such as compute time for parsing/transformation (XSLT), API gateway or integration platform usage, and storage/egress fees in cloud environments.

Category: software

Difficulty: intermediate

Related Terms

See Also