XML is a markup language that is used to transport and store data. It uses tags and attributes to provide extra information about the data. XML documents are structured as trees, with a single root element and child elements nested within parent elements. The structure and elements of an XML document can be defined using a DTD or XML schema. Benefits of XML include being text-based, modular, and able to represent semantics along with data, while obstacles include verbosity and lack of intrinsic data types.