manoelcampos / xml2lua

XML Parser written entirely in Lua that works for Lua 5.1+. Convert XML to and from Lua Tables 🌖💱
MIT License
287 stars 73 forks source link

Would you provide a more convenient API for parsing XML to a table? #98

Open atship opened 4 months ago

atship commented 4 months ago

Now we need to require('xmlhandler.tree') and call xml2lua.parser(handler):parse(xml), now we need to use handler.root to get the table I found the helper function at https://github.com/manoelcampos/xml2lua/issues/92#issuecomment-1843106426, now we can parse xml to a table like this local tb = xml2lua.parse(xml). would you provide something like this helper function to your API list? It's convenient for users in my opinion. Thank you in advance.