Minimal XML parser?

papadeltasierra
Posts: 28
Joined: Thu Nov 03, 2022 1:57 pm

Minimal XML parser?

Postby papadeltasierra » Sun Dec 10, 2023 6:12 pm

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?

papadeltasierra
Posts: 28
Joined: Thu Nov 03, 2022 1:57 pm

Re: Minimal XML parser?

Postby papadeltasierra » Sun Dec 10, 2023 8:08 pm

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.

papadeltasierra
Posts: 28
Joined: Thu Nov 03, 2022 1:57 pm

Re: Minimal XML parser?

Postby papadeltasierra » Mon Dec 11, 2023 9:25 am

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 :-).

Who is online

Users browsing this forum: No registered users and 349 guests