HTTP binding always returns NULL from xml

I am running OpenHab 2 on a Raspi3.

Since days I am not able to sort out the following problem:

I installed the HTTP binding in PaperUI.

http.cfg:

timeout=1000
granularity=1000
format=true
panazustand.url=http://192.168.0.248:55000/dmr/ddd.xml
panazustand.updateInterval=1000

The IP refers to my Panasonic Smart TV. ddd.xml starts as follows, when I enter the url to my browser:

10
urn:schemas-upnp-org:device:MediaRenderer:1
49EX600_Series
Panasonic
Panasonic VIErA
TX-49EX600W
uuid:4D454930-0100-1000-8001-D8AFF1B13DD2
uuid:4D454930-0000-1000-8001-D8AFF1B13DD2
uuid:4D454930-0100-1000-8001-D8AFF1B13DD2
uuid:4D454930-0200-1000-8001-D8AFF1B13DD2
4726525383056154
… and so on…

I just want to check whether this file exists. If yes, the TV is on. If no, the TV is off.

Therefore I created the following code (based on the idea of another user found here: Get current state (on/off) of panasonic tv)

Items:

String Test { http="<[panazustand:1000:REGEX([0-9])]"}

Item “Test” should be Null if the file does not exist. It should be “1” (the first character of the ddd.xml) if it exists.

Then I have a rule created:

rule "Test"

when
Item Rainer_Tablet_Ping changed
then
        logInfo("TV", Test.state.toString)
end

My expectation was that this writes either “null” or “1” (the first character of the ddd.xml) to the log-File.
Unfortunately it does not.
Logging shows: “2018-09-15 20:46:05.634 [INFO ] [rg.eclipse.smarthome.model.script.TV] - NULL”, no matter if the file exists or not.
Remark: The trigger “Rainer_Tablet_Ping” is just to give me a logInfo every few seconds.

Can somebody point me to the mistake I am making?
Thanks a lot!

In the other code that you link to the REGEX was:

String tvzustand { http="&lt;[panazustand:30000:REGEX(. *?(.* ?).*)]"}

Did you try that?

Thanks for your response.

Yes, I tried this REGEX expression with and without spaces:

REGEX(. *?(.* ?).*)
REGEX(.*?(.*?).*)

both lead to the result NULL.

I changed to the simple

REGEX([0-9])

because I did not understand the original expression.
I tried all on https://regex101.com/r/cO8lqs/22, which at least shows what the result should be in either case.