Has anyone found a way to parse an XMl result coming back from an HTTPGET or HTTPPost request? if the result is JSOn this is nice and easy, but I cna not find a way to do this with XML. I tried to use an XMLParse object but this failed.
I then tried to just use a Pattern and this also failed:
def p = ~/<isEnable>?<\/isEnable>/
assert p instanceof java.util.regex.Pattern
assert p.matcher(aline).matches() { log.debug("Match=" + it) }
9:33:26 PM: error Invoking methods on class java.util.regex.Pattern is not allowed
Am I coding this wrong or is it just not supported?
It would be great if all objects had a JSON API but this is not the case for the Foscam I am working on.
Of this, Im really interested in the value of State (def state), which I can easily get, but Im not able to get the value of the “LastUpdateTimestampTicks” field
log.debug of list, ends up with groovy errors
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
5
Todd how does one do a Regex match and extract the groups in ST?