XML (Extensible Markup Language)


XML is a text-based markup language for representing structured documents and data. It is based on SGML, but omits most of the features that make generic SGML difficult to parse. Notable file formats based on XML include XHTML, XSLT, RSS, Atom, DocBook, OpenDocument and MathML.

Because of its widespread use there are many libraries and utility programs for processing generic XML documents. These include parsers, validating parsers, and utilities for transforming and querying XML documents using languages such as XSLT, XQuery, XPath and XInclude.

XML parsers can be classified as tree-based or stream-based. A tree-based parser reads the whole of the document into memory then provides access to the resulting data structure. A common method for accessing this representation of the document is through the Document Object Model (DOM) API. A stream-based parser converts the document into a sequence of events, which are typically realised as callback functions. A common method for interacting with a stream parser is the SAX API. Notable XML parsers include Expat, libXML and Xerces.

See also

Further reading