Skip to content

Add Roblox .rbxmx as XML#8032

Open
gords2 wants to merge 2 commits into
github-linguist:mainfrom
gords2:add-roblox-rbxmx-rbxlx
Open

Add Roblox .rbxmx as XML#8032
gords2 wants to merge 2 commits into
github-linguist:mainfrom
gords2:add-roblox-rbxmx-rbxlx

Conversation

@gords2

@gords2 gords2 commented Jun 21, 2026

Copy link
Copy Markdown

Add .rbxmx and .rbxlx to the XML language.

Description

.rbxmx (Roblox model) and .rbxlx (Roblox place) are the XML-based serialization formats produced by Roblox Studio and the wider Roblox tooling ecosystem (Rojo, etc.). Both are well-formed XML documents rooted in a <roblox …> element with an xsi:noNamespaceSchemaLocation pointing at roblox.xsd, so they classify naturally as XML.

This PR:

  • Adds .rbxlx and .rbxmx to the XML entry in languages.yml, kept in case-sensitive alphabetical order (between .qhelp and .rdf).
  • Adds one real-world sample for each extension.

Neither extension is currently associated with any other language, so no heuristic is required.

Resolves #7928.

Checklist:

.rbxmx (Roblox model) and .rbxlx (Roblox place) are Roblox Studio's
XML-based serialization formats. Both are well-formed XML documents
rooted in a <roblox> element. This adds the two extensions to the XML
language entry and includes a real-world sample for each.

Closes github-linguist#7928
@gords2 gords2 requested a review from a team as a code owner June 21, 2026 02:37

@Alhadis Alhadis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usage for the .rbxlx extension is too thin to be eligible for addition; there's currently only 108 such files indexed on GitHub. The .rbxmx extension, OTOH, clearly checks out (~46.2k search results for that extension).

In addition, the size of the samples you've added are, uh, kind of huge (and they'll slow the classifier down needlessly). Could you cull the .rbxmx sample down to, say, ~100 lines or so? (Making sure the source remains well-formed XML, though).

You'll also need to remove the .rbxlx extension from this PR (and thus also its sample), owing to the scant in-the-wild usage.

Both are well-formed XML documents

😉 Technically, a well-formed XML document includes an XML declaration (<?xml version="1.0"?>), which incidentally is the reason these files aren't being recognised by Linguist's [XML header] strategy.

Comment thread lib/linguist/languages.yml Outdated
Comment thread samples/XML/roblox-baseplate.rbxlx Outdated
Comment thread samples/XML/roblox-model.rbxmx
@Alhadis Alhadis changed the title Add Roblox .rbxmx and .rbxlx as XML Add Roblox .rbxmx as XML Jun 21, 2026
Per review feedback on github-linguist#8032:

- Remove the .rbxlx extension (and its sample) due to thin in-the-wild
  usage (~108 indexed files), keeping only .rbxmx (~46.2k).
- Trim the roblox-model.rbxmx sample from 246 to 82 lines so it no
  longer slows the classifier, keeping the source well-formed XML.
@gords2

gords2 commented Jun 21, 2026

Copy link
Copy Markdown
Author

Pushed 71c75be addressing the review:

  • Dropped the .rbxlx extension and its sample (roblox-baseplate.rbxlx) given the thin in-the-wild usage.
  • Cut roblox-model.rbxmx from 246 → 82 lines (one Part), still well-formed XML.

Good call on the XML-declaration point — and that is precisely why the extension mapping is needed here: Roblox Studio writes these files without an <?xml ?> prolog, so the XML-header strategy never fires. Left the sample prolog-less to stay representative of real-world .rbxmx output.

@Alhadis Alhadis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mark .rbxmx and .rbxlx as XML

2 participants