Select your language

Sign up

XML (eXtensible Markup Language) represents and exchanges structured data. Element names are defined by each document format. Joomla uses XML for extension manifests, form definitions and update sources, among other purposes.

Structure and syntax

An XML document has one root element. Nested elements must close correctly, names are case-sensitive and attribute values require quotation marks. Special characters in text must be escaped, for example by representing an ampersand with its entity.

Correct syntax makes a document well-formed. It does not prove that the document meets an application’s requirements. A schema can further define its permitted structure. Namespaces distinguish identical element names belonging to different formats.

XML, HTML and JSON

HTML describes web documents using predefined element semantics. XML permits custom data structures. JSON represents data with objects, arrays and values. The receiving interface determines the appropriate format, rather than which format is newer.

Uses in Joomla

A manifest tells Joomla’s installer the extension type, version, files and configuration. Its extension root describes the package, name identifies it and version specifies its release. Valid XML alone is insufficient: the package must contain the corresponding files.

Joomla form definitions describe fields and their parameters, while update-source XML helps locate suitable packages. Each document type has its own requirements. Modern form handling should not be defined solely by the older JForm class name.

Validation and safety

Check encoding, nesting and conformance to the required format. When processing untrusted XML, limit input size and external entity capabilities so that the parser cannot access unintended files or network resources.

Summary

XML describes structured data and supporting Joomla documents. Both correct syntax and compliance with the format expected by the application are essential.

Newsletter Subscription
Enter your email address and we will keep you updated!

Joomla.center is not affiliated with or endorsed by the Joomla!® Project or Open Source Matters. The Joomla!® name and logo is used under a limited license granted by Open Source Matters, the trademark holder in the United States and other countries.