HTTP-Binding XPATH - no values

Tags: #<Tag:0x00007f616ea6d020> #<Tag:0x00007f616ea6ce90>


i have a problem with the HTTP-Binding.
I would like to extract some weather values from the following page:

My item looks like this:

Number WeatherTemperature "Temperatur [%.1f °C]" { http="<[[49]/td[3])]" }

I checked the XPATH code, that seems to be okay:

The HTTP-Binding and the XPath transformation service is installed/enabled.
However, what i find a bit strange is that there are no entries from the http binding in the log file.

Do you have any idea where the problem could be?

Thanks in advance!

Make a temporary String Item using the url, with a no-op transform like REGEX((.*)), see if you get what you expect.

Hi, thanks for your reply.
When i create a new item like this:

String WeatherTest "Test" { http="<[*))]" }

then i get the following error:

[WARN ] [org.eclipse.jetty.http.HttpParser ] - URI is too large >8192

After this i tried different XPATH variants (for expamle //*[local-name()=‘xxx’]) without success. It seems that there is a problem with the XPATH code parsing a xmlns code because of the namespace.

Is there maybe a way to extract values from a website with REGEX?

Thanks in advance!

I’ve no idea what you are doing now.
The test String Item doesn’t involve XPATH
Did you get the content you expected, or did you get the WARN message instead? It’s not clear.

That error message is usually associated with an image display in a UI

So far as I can see, that URL returns an HTML webpage so I would not expect XPATH to parse it correctly.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.