It sure would be nice to have XML in LOVE...
What about this?
http://xerces.apache.org/xerces-c/
XML in Love
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Centauri Soldier
- Prole
- Posts: 42
- Joined: Mon May 21, 2012 6:38 am
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: XML in Love
Though, there's a lot of Lua libraries for XML manipulation...
Lua XML Parser
LuaXML
LuaExpat
Lpegxmlreader
XML Parser
PureLua XML parser
...
Maybe, given this huge number of Lua XML parsers, it sounds pointless having XML parsing built-in Löve...?
Lua XML Parser
LuaXML
LuaExpat
Lpegxmlreader
XML Parser
PureLua XML parser
...
Maybe, given this huge number of Lua XML parsers, it sounds pointless having XML parsing built-in Löve...?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: XML in Love
An important reason for not including an XML parser is the incredibly low demand for it.
Help us help you: attach a .love.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: XML in Love
Have you considered using native Lua instead of XML? Lua is Excellent for expressing raw data, just like xml is. And Lua itself is very easy to parse from LÖVE.
For example, if you wanted to parse something like this:
You will have a much easier time if you just encode that data using lua:
You literally need 1 line to parse the second file in LÖVE, and no extra libraries.
If you have a big XML file that you want to parse, consider transforming it using an automated tool to something like JSON. Transforming JSON to Lua shouldn't be very complex.
For example, if you wanted to parse something like this:
Code: Select all
<map>
<cell>1</cell>
<cell>2</cell>
</map>
Code: Select all
return {
map = {
cell = { 1, 2 }
}
}
If you have a big XML file that you want to parse, consider transforming it using an automated tool to something like JSON. Transforming JSON to Lua shouldn't be very complex.
When I write def I mean function.
- Centauri Soldier
- Prole
- Posts: 42
- Joined: Mon May 21, 2012 6:38 am
Re: XML in Love
Well, as much as I love pure lua and despite the fact that my entire current project and all of its modules are using lua tables to store data, I still find a need from time to time to use xml. I just wondered if it had been considered and after viewing your answers I can see your logic regarding the low demand for it.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 143 guests