26.11.2017, 01:26
(This post was last modified: 26.11.2017, 01:33 by Erwin van der Zwart.)
Hi,
Try this:
BR,
Erwin
Try this:
Code:
xmldata = "your XML reply"
for i in string.gmatch(xmldata, '<basic.-</basic>') do
result = i:match([[<sourceDescription>(.-)</sourceDescription>]])
if result ~= nil then
grp.update('1/1/1', result)
end
end
for i in string.gmatch(xmldata, '<basic.-</basic>') do
result = i:match([[<sourceStatusText>(.-)</sourceStatusText>]])
if result ~= nil then
grp.update('1/1/2', result)
end
end
for i in string.gmatch(xmldata, '<status.-</status>') do
for i in string.gmatch(xmldata, '<info.-</info>') do
selector = i:match([[<key>(.-)</key>]])
if selector == 'AirPlay' then
result = i:match([[<value>(.-)</value>]])
if result ~= nil then
grp.update('1/1/3', result)
end
end
end
end
Erwin