Hello I have this string XML:
"<Selection xmlns="http://tempuri.org/">184028.884942584,664923.573252621,183875.392224311,664759.166484197</Selection>
<PipeCount xmlns="http://tempuri.org/">78</PipeCount>
<ControlValveCount xmlns="http://tempuri.org/">4</ControlValveCount>
<ServiceValveCount xmlns="http://tempuri.org/">26</ServiceValveCount>"
I need to get from XML above values(for example value of Selection node).
Here how I do it:
var parser = new DOMParser().parseFromString(data.documentElement.innerHTML, "text/xml");
var val = parser.getElementsByTagName("Selection").nodeValue;
But val is null. Any idea what I do wrong why val is null?
UPDATE: I tryed this: var val = parser.getElementsByTagName("Selection")[0].nodeValue; The val is null.