Need help with XML value to item


i’m trying to get values from an XML
url into a Number Item. Without any success.
Would really appreciate some help :slightly_smiling:

My item:

Number SpotPris “Spotpris [%.1f sek/mwh]” (kwh) { http="<[]" }


<?xml version="1.0"?>


<xsl:output indent=“yes” method=“xml” encoding=“UTF-8” omit-xml-declaration=“yes” />

<xsl:template match="/">
<xsl:value-of select="//data/@value" />


When I change my item to a String and formating to [%s] the Item shows all the values from XML.
Seems like my transformation doesn’t work.

I am not very familiar with xls transform but a quick google brought up the [last()] command.

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="" version="1.0">

<xsl:output indent="yes" method="xml" encoding="UTF-8" omit-xml-declaration="yes" />

<xsl:template match="/">
	<xsl:value-of select="(//data/value)[last()]"/>

last edit this works
created and tested at

Thank you! Works perfect :smile: