Turning XML into an Array

Hello! My name is thebigreeman, I own a very advanced game called “Insert Wars Ultimate” that uses webservers to achieve a fully sandboxed and restriction free environment that can insert any model that is on sale! I recently came across a ROBLOX archive of a now defunt feature called “Sets” that also included a working clone of the original LuaWebservice endpoint for getting information about sets from InsertService.

(Old Defunct Endpoint Example: http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=10&type=base)

(New Working Endpoint Example: https://sets.pizzaboxer.xyz/Game/Tools/InsertAsset.ashx?nsets=10&type=base)

  1. What do I want to achieve? My goal is to incorporate this “Sets” system into my custom insert tool for users to access.

  2. What is the issue? Sadly, these “Legacy” endpoints were designed to use XML instead of the blessed JSON format in newer endpoints which makes it much more harder for my scripts to understand and read the information coming from the endpoint.

  3. What solutions have you tried so far? I have tried multiple solutions such as finding the source code for the InsertService :GetBaseSets() and :GetUserSets() in a 2016 source repository. I couldn’t find anything but its most likely the fact I just didn’t look deep enough as it felt like I was going down a rabbit hole. Then after that I tried making my own XML to Array converter using string.match but all the methods I chose either didn’t work at all or gave me the wrong output.

If anybody could find any source code to how the ROBLOX sets endpoints were converted into a readable format or any code that can convert XML into an array, please tell me!

Thank you.

2 Likes

Theres a API that turns XML to JSON, then you can convert it with JsonDecode(). Dont know if this works, since its currently in high volume traffic. You can check out its repository if you want its source code. Not sure if this is what you wanted, but here you go :slightly_smiling_face:

GitHub - manoelcampos/xml2lua: XML Parser written entirely in Lua that works for Lua 5.1+. Convert XML to and from Lua Tables 🌖💱 is a good library here

good luck figuring out how to properly install it into your Roblox project, you’ll also need to translate the require calls from strings to roblox paths

Thank you guys for the solution but the problem has already been solved.

By using inspect element and navigating the set archive website while recording all traffic, I was able to get JSON endpoints.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.