I am really struggling with Highcharts. We have an energy meter that exposes data via XML.
I've been tasked with making a dynamic spline chart similar to the demo, here: http://www.highcharts.com/demo/dynamic-update
Does anyone know if it's possible to use XML data (instead of a random number) to populate the y-axis?
The XML looks like this.
<?xml version="1.0" encoding="UTF-8" ?>
<DAS>
<name>Main Campus</name>
<serial>05778</serial>
<devices>
<device>
<name>Building #1</name>
<records>
<record>
<point number="0" name="Electric" units="kWh" value="1564341.000" />
<point number="5" name="Water" units="gallons" value="764563.000" />
<point number="10" name="Gas" units="cu/ft hr" value="396380.000" />
<point number="15" name="Relative Humidity" units="%" value="67.175" />
<point number="20" name="Outdoor Air Temp" units="Deg. F" value="54.476" />
<point number="30" name="Indoor Temp" units="deg.F" value="71.324" />
</record>
</records>
</device>
</devices>
</DAS>
I've tried parsing the XML into JSON, but nothing seems to be working. Is it because the XML lacks a closing </point>
tag?
If I could get the kWh working I think I could get the rest of the points to work. Any examples or advice are much appreciated? Thanks much.