Skip to content

What is XML?

XML is a markup language, similar to HTML, but without predefined tags. It can be used to hold any kind of structured data. While HTML is designed to display data, XML is designed to carry data.

HTTP responses from REST APIs are often in either JSON or XML format; however, JSON is more common and easier to read.

XML handles data in two ways:

  1. Tags: Tags are "markup" that hold content. Tags start with < and end with /> (usually).

  2. Attributes: Attributes indicate some property about data (metadata).

Info

The "X" in XML stands for "Extensible," meaning that XML is a data format that is flexible and customizable.


Sources