Page 1 of 1

Minimal XML parser?

Posted: Sun Dec 10, 2023 6:12 pm
by papadeltasierra
Is there smaller XML parser that the ESP32 can use than `expat`? Smallest component size for `expat` seems to be about 85230 bytes - anyway to get this smaller?

Re: Minimal XML parser?

Posted: Sun Dec 10, 2023 8:08 pm
by papadeltasierra
Also wondering how I would enable the minimal build option XML_MIN_SIZE/EXPAT_MIN_SIZE. I don't see how to add EXPAT_MIN_SIZE to the CMake configuration.

Re: Minimal XML parser?

Posted: Mon Dec 11, 2023 9:25 am
by papadeltasierra
Slightly off-topic but if you are reading this consider, "can I avoid using XML completely"? My project talks to Microsoft Azure so I believe I can write an anonymous Azure Function that will sit between my app and the "XML returning Azure resource"; this will work like this:
- My app makes a simple HTTP request to the Azure Function
- The Azure Function makes the "request to the Azure resource that returns XML"
- The Azure Function does the logic that I was trying to implement in my app (pick the "best" element from the XML list)
- The Azure Function returns the result as a simple short string to the app (as the body of the HTTP response)
- The app now has the result without having to do either the "pick the best" logic OR without having to parse XML and the need for the XML parsing library completely!

Moral, push as much processing of your small app as possible :-).