Slice tag issue

Topics related to the iOS and/or Apple Watch app.
Post Reply
Posts: 4
Joined: Wed Feb 14, 2018 11:31 pm

Slice tag issue

Post by typiak84 » Thu Feb 15, 2018 12:17 am


Here is my Denon Receiver Xml feedback:

<?xml version="1.0" encoding="utf-8" ?>
<FriendlyName><value>DENON AVR-3313</value></FriendlyName>
<RenameZone><value>MAIN ZONE
<InputFuncSelect><value>TV AUDIO</value></InputFuncSelect>
<selectSurround><value>DTS NEO:6 cinema </value></selectSurround>

The goal of my scrip is to use the slice function to parse this feedback to extract the value between "<Power><value>" and "</value></Power>" and put it in a global variable called "DenonAVRPowerState"

Here is the script i try to use:
_global.DenonAVRPowerState = _feedback;

And here is the error script message i got whith this script:
Javascript Error!
Button: "STATUS QUERY Power" - Feedback script
SyntaxError: Unexpected token ":" (line 1)

Could you explain me where is my syntax error please ?
Kind regards.

Post Reply