Skip to content
uencoder

XML

XML (Extensible Markup Language) is the W3C-standard markup language describing data with a tag tree, supporting namespaces, schema validation, and style transformation.

Purpose

To provide a self-describing, validatable, transformable document exchange format for scenarios needing strict structure and a rich tool ecosystem.

Mechanism

A document consists of a declaration, elements (<tag>content</tag>), attributes, comments, CDATA, and processing instructions. Namespaces declared with xmlns avoid tag collisions. Structure can be validated by DTD or XSD, and XSLT transforms documents.

Use cases

  • SOAP web services
  • SVG vector graphics
  • Office documents (.docx is ZIP+XML)
  • Configuration and manifests (pom.xml, AndroidManifest)

Examples

  • Input
    <person><name>Ada</name></person>
    Output
    The tree {person:{name:"Ada"}}

    Nested tags

Common errors

Unescaped < > & breaks parsing
Escape them with the entities &lt; &gt; &amp;

Related terms

Related tools

Related tutorials

References