Parse XML

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

Moderators: marcelr, TheHogNL, TerrorSource, Toonz

Parse XML

Postby SDeath » Fri Jan 11, 2019 8:46 pm

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.2.11 (rooted)
SDeath
Starting Member
Starting Member
 
Posts: 42
Joined: January 2019

Re: Parse XML

Postby SDeath » Sat Jan 12, 2019 12:05 pm

Nevermind I figured it out.
Toon1 running firmware 5.2.11 (rooted)
SDeath
Starting Member
Starting Member
 
Posts: 42
Joined: January 2019


Return to Toon software development

Who is online

Users browsing this forum: No registered users and 1 guest