How to parse xml response from WLED

Hi all openhab and WLED gurus,

I have a front door bell node that flashes a WLED preset when pressed.
I want to extract the current brightness and effect from the xml string wled publishes to MQTT.
<ac>106</ac> and <fx>34</fx> values are needed.
How can I extract and save these 2 values before changing to the preset in order to return WLED to its previous state automatically ?

The truncated xml string and my current rule,which turns WLED off after the preset has run , are below.

<?xml version="1.0" ?><vs><ac>106</ac><ns>1</ns><nr>1</nr><nl>0</nl><nf>1</nf><fx>34</fx></vs>
rule "Front Gate Bell Pressed"
    Item Front_Gate_State received update
if(Front_Gate_State.state == "ring") {
sendCommand(wled_giantled, "PL=1")           // Select Preset 1 - Red Blink
    if(WledTimer !== null) {
        WledTimer = null
    if(Front_Gate_State.state == "noring"){
        WledTimer =  createTimer(now.plusSeconds(20)) [|
            if(Front_Gate_State.state == "noring") {
sendCommand(wled_giantled, "T=0")           // Turn off -  want to return to previous state here

Running OH 2.4 and MQTT 1


Have a look here

This is old.

It’s likely that not much has changed, but perhaps the most relevant docs are the archived ones for OH2.5. They don’t go back any further.