I already tried to validate the xpath in this page https://www.freeformatter.com/xpath-tester.html - but it does not seem to accept the HTML input from the website (which could be another hint why this is failing)
Besides the fact, that this isn´t probably recommended (but mostly sufficent for an old-school bavarian website, I think ) , you could use RegEx in your scenario. As i´m not really experienced with this type of transformation, it might be not the nicest way doing this, but maybe this helps you finding a starting point:
Im not using RegEx in my setup right now, but based on the documentation, your item definition should be correct. If its not working, try to escape the " inside the expression with a slash. If youre using it in a rule, it would be something like:
Hmm, dont know… there are so much chars to escape in OH due to its string conversion, that it messes up more complex rules… so for a quick success, you could use this - it works but would break very easy, if anything on the current site-structure will change.
Number watertemp "Wassertemperatur Tegernsee [%s]" { http="<[https://www.nid.bayern.de/wassertemperatur/issar/gmund_tegernsee-18201303:10000:REGEX(.*?<td\\s\\sclass=\"center\">(.*?)</td>(.*))]" }
One thing that is important to understand about the REGEX transform is that the pattern needs to match the entire String, in this case the entire HTML document. The first matching group (i.e. first set of parens) is what gets returned if the expression matches the whole String.