XML

The Roblox XML file format is based on the XML language and is used to store human-readable data of serialized instances. Roblox Studio allows exporting places (.rbxlx) and models (.rbxmx) in the file format as well as loading files in the format. XML was the only primary format for instance data until it was switched to a binary format for data compression.
Until 2011, XMLs were used to make custom assets including meshes, images and even audio by storing Base64 data into a binary element. This was patched in early 2011, consequently rendering meshes and images invisible and audio unplayable.
== Format ==
The elements used in the format are the following:
;roblox
:Represents the root of the data structure. In most cases, the element is in this form: <roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
;Item
:Represents an instance and may include the attributes class=ClassName and referent=string. Items in the element are known as children.
;Properties
:Represents a set of properties, each of which is an element with a markup representing a data type, an attribute name with a value representing the property's name and its content representing a value. (e.g. <bool name="Anchored">true</bool>)
;binary
:Represents binary data in Base64. This element is no longer supported by the engine for security reasons.
== Uses ==
XML was the only format used by Roblox for storing instance data (using the file extensions .rbxl and .rbxm) until Roblox introduced a binary format for data compression, which is now the primary format. Although the use cases for using XML are very few, it had some legacy uses.
=== Binary data exploit ===
:
An exploit that existed until early 2011 was use of binary data to load custom images, meshes and even audio through editing XML files, which would bypass moderation. In XML, the binary element would be inserted into a content property with its content representing binary data in Base64.https://devforum.roblox.com/t/recovering-old-user-injected-meshes-2007-2010-era/701912 Binary data (such as an image) must be converted into Base64 to be read. In order to load meshes, the mesh format must be converted to the Roblox mesh format first. This exploit resulted in custom assets being made, notably such as the fire mesh, which would find its use in popular places like Reason 2 Die, as well as images displayed in a popular free model titled TV! (IT WORKS). This was patched in early 2011, consequently rendering the meshes and images invisible and audio unplayable.
An asset created from the exploit still can be accessed by downloading the original file itself (through the website), which can be opened through a pre-2011 version of the Roblox client (including Roblox Studio). A mesh asset can also be opened in the newer versions of Roblox Studio by decoding the Base64 data, saving the data itself in a file, putting the file in the folder where rbxasset:// can access and then link a mesh Content property to the file. This way, Roblox Studio can export the mesh into a mesh format that other programs can read such as Blender.
== References ==
Category:Features