Parse XML

Everything about software tools, new software development and toolchains. For developers, mostly.

Moderators: marcelr, TheHogNL, Toonz

Post Reply
SDeath
Member
Member
Posts: 53
Joined: Tue Jan 01, 2019 5:23 pm

Parse XML

Post by SDeath »

Hello all,

I received a rooted Toon from TerrorSource.

I started a app to read my FP4All solar inverters and show the power readings on a tile.
The goal is to create a power meter in the end and maybe some graphs.
I will make it available in the ToonStore in the end.

I managed to create a config page, and save the values in .json and read them on app startup.
Created a systray icon that would also load the config page and all.

Next thing I need is parsing an XML file like the example below:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<response>
<gauge_power>443</gauge_power>
<gauge_temp>34.0</gauge_temp>
<gauge_vpv>335.5</gauge_vpv>
<gauge_iac>1.8</gauge_iac>
<energy_today>1.100</energy_today>
<energy_total>139.6</energy_total>
<hours_total>461</hours_total>
<time_stamp>20190111 13:27</time_stamp>
</response>
I don't think I can parse these with the json parse function right?
Is there a XML parse function?

Thank you for your help.
Toon1 running firmware 5.33.9 (rooted)
SDeath
Member
Member
Posts: 53
Joined: Tue Jan 01, 2019 5:23 pm

Re: Parse XML

Post by SDeath »

Nevermind I figured it out.
Toon1 running firmware 5.33.9 (rooted)
Post Reply

Return to “Toon software development”