XML, or Extensible Markup Language, is a text format that structures data using nested tags you define yourself. Every piece of content sits between an opening tag and a matching closing tag, and elements can carry attributes and contain other elements. This makes XML self-describing: a well-named document is readable without a separate schema, though schemas like XSD exist to enforce structure formally.
Although JSON has replaced XML for most new web APIs, XML remains everywhere in practice. RSS and Atom feeds, XML sitemaps that guide search engine crawlers, SOAP web services, office document formats, and countless enterprise integrations all rely on it. Anyone working in SEO encounters XML directly through sitemap.xml files that list a site's URLs along with metadata like last-modified dates.
XML's strengths are its rich feature set — namespaces to avoid tag collisions, attributes for metadata, comments, and mature validation tooling — and its precise, unambiguous structure. Its weaknesses are verbosity and complexity: the same data expressed in XML is usually much larger than in JSON, and parsing it correctly, including entity handling and namespaces, is more involved.
Converting between XML and friendlier formats is a routine task. Transforming XML to JSON simplifies consuming legacy feeds in modern code, while converting CSV to XML prepares tabular data for systems that expect it. When editing XML by hand, well-formedness matters: every tag must be closed, tags must nest properly, and reserved characters like the ampersand must be escaped as entities.