XML is a markup language that is used to carry data, not display it like HTML. It allows users to define their own elements and tags. XML separates data from presentation and is used to transport and store data between incompatible systems. An XML document forms a tree structure with elements nested within other elements. Elements can contain text, attributes, and other elements.