How can I use .txt or .xml reference file to slice up spritesheets in Lua?

I’ve been learning to code games in Lua, and I’ve recently started on my own project. I wanted to use the following spritesheet from, as well as a few other spritesheets from them

enter image description here

but I’m a little confused as to how to cut it up. Some of the sprites are irregularly sized from the normal 70×70, and there’s a 2px gap between each one, so my current understanding of how to generate quads from a spritesheet doesn’t seem to apply

Thankfully, the spritesheets each come with an associated .txt or .xml file (it varies, not sure why) that gives the top left x/y coordinates, as well as the width and height of each sprite. This seems like it would make the job of creating a reference table of sprites really easy, but I can’t figure out how to include something like

<SubTexture name="box.png" x="0" y="864" width="70" height="70"/> <SubTexture name="boxAlt.png" x="0" y="792" width="70" height="70"/> <SubTexture name="boxCoin.png" x="0" y="720" width="70" height="70"/> <SubTexture name="boxCoinAlt.png" x="0" y="576" width="70" height="70"/> 


fishSwim1 = 76 0 66 42 fishSwim2 = 73 43 62 43 flyDead = 143 0 59 33 flyFly1 = 0 32 72 36 flyFly2 = 0 0 75 31 

as a reference file in my Lua code. Everything I’ve seen online has been guides on chopping up spritesheets with uniform width and height, or using some website or service to create a spritesheet/reference file, which I don’t need to do (and I’d rather do as much as possible within my code)