¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Brute-force parsing of an XML stream ? (cc128 Current Cost)


 

Hey Group,


I'm working on a CurrentCost Envi cc128 device. It's a power meter, and its RS232 output can (and will) spit power consumption data.

It outputs a realtime and short xml stream whenever it gets a reading from one of its meters.

It also outputs a set of possibly very long xml data sets every two hours.



I'm parsing the "realtime" data just fine. I even put together a cool little graph using the Google Charts module from XXXXX.


Problem is, now I gather the string and search for the tags i'm looking for. I suspect that won't work with the very long xml for daily, weekly and monthly data.

I'm not willing to parse and store all the data. Far from that, I'm only willing to retrieve one or two days of hourly history, one or two weeks, and one of two months. The idea is to generate history charts for one hour, one day, one week, one month. Well, maybe one year too.

For that I should read data as it flows through my module. How would you gurus do that ?


--
Marc-Etienne HUNEAU Dark Side of the Room (DSR)
+33 (0)6 615 516 90

Join [email protected] to automatically receive all group messages.