This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
DannySMc's profile picture

Xml Parser?

Started by DannySMc, 24 August 2015 - 10:27 AM
DannySMc #1
Posted 24 August 2015 - 12:27 PM
Hello,

I was wondering if anyone knows of a good xml parser? I have used a few pure lua ones but they use a lot of io.open:read('*all') and other functions that are not supported by ComputerCraft, so was wondering if someone has made one, I know it sounds easy but I have NEVER used xml until today, so need to get it to come back in an array etc :P/> So if anyone knows of a good one please tell me, it HAS to work in CC though.

Thanks guys!
MKlegoman357 #2
Posted 24 August 2015 - 12:33 PM
Here's one: SLAXML
Exerro #3
Posted 24 August 2015 - 12:51 PM
If you take a look at Silica's source there's something virtually identical to an XML parser. As well as the normal XML things, it supports attributes not as strings, such as <a b=2 c=something d="hi"/>.

This is probably not quite as accurate as the one MKlegoman posted in all honesty, but maybe simpler to set up.
Edited on 24 August 2015 - 10:52 AM
DannySMc #4
Posted 24 August 2015 - 02:47 PM
Here's one: SLAXML

I tried this and it does not work? just errors, do you know how to use it? I did Google it before asking.
MKlegoman357 #5
Posted 24 August 2015 - 08:39 PM
On which part does it error. You'll have to use dofile() instead of require() because CC doesn't have that. Other than that I've used it and it works perfectly.