Commit 6530d531 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Minor fixup on Domparser usage

parent ca9bd36e
...@@ -7,12 +7,11 @@ ...@@ -7,12 +7,11 @@
"use strict"; "use strict";
var DISPLAY_JSON_FORM = 'display_json_form', var DISPLAY_JSON_FORM = 'display_json_form',
DISPLAY_RAW_XML = 'display_raw_xml', DISPLAY_RAW_XML = 'display_raw_xml';
domparser = new DOMParser;
function jsonDictToParameterXML(json) { function jsonDictToParameterXML(json) {
var parameter_id, var parameter_id,
xml_output = $((new DOMParser).parseFromString( xml_output = $((new DOMParser()).parseFromString(
'<?xml version="1.0" encoding="UTF-8" ?><instance />', 'text/xml')); '<?xml version="1.0" encoding="UTF-8" ?><instance />', 'text/xml'));
// Used by serialisation XML // Used by serialisation XML
for (parameter_id in json) { for (parameter_id in json) {
...@@ -30,7 +29,7 @@ ...@@ -30,7 +29,7 @@
} }
function jsonDictToParameterJSONInXML(json) { function jsonDictToParameterJSONInXML(json) {
var xml_output = $((new DOMParser).parseFromString( var xml_output = $((new DOMParser()).parseFromString(
'<?xml version="1.0" encoding="UTF-8" ?><instance />', '<?xml version="1.0" encoding="UTF-8" ?><instance />',
'text/xml' 'text/xml'
)); ));
......
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1003.60531.19628.1092</string> </value> <value> <string>1003.60564.512.29713</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1666889520.35</float> <float>1666896829.85</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment