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

Improve serialiser handling of attributes #42

Closed ghost closed 4 years ago

ghost commented 4 years ago

Close #41

ghost commented 4 years ago

I'm thinking the DOM handler is easier to serialise. It would also permit other XML types to be serialised appropriately.

EDIT: In fact, the DOM handler also doesn't rearrange text nodes interwoven with XML children, making it much less destructive

manoelcampos commented 4 years ago

Hello @lmn8 Sorry for the late reply, but I'm really busy these days. Are you planning to fix the other items? Because those would be new issues.

If you are done already, I'll try the code for merging. I checked quickly and seems to be OK.

Thanks for contributing.

ghost commented 4 years ago

You can merge it. The other issues (CDATA, text node rendering) are going to require handler changes too, so you would need to bump the version.

At some point, I can open a pull that will allow serialising DOM handler roots.