The following code returns "Method arguments must be enclosed in parentheses" in the error catch. I am having trouble isolating the problem. Any help would be appreciated
HS4 Standard Edition 4.2.0.0 (Windows)
Running on Win 10
I think the error is with the with end with but I don't see anything obvious:
.
Thanks
Will
HS4 Standard Edition 4.2.0.0 (Windows)
Running on Win 10
I think the error is with the with end with but I don't see anything obvious:
Code:
Sub Main(parm as object) dim objXML dim objNodes dim objNode dim logname="Traffic XML Error" try objXML = CreateObject("MSXML2.DOMDocument.6.0") [B]With objXML .SetProperty "SelectionLanguage", "XPath" .ValidateOnParse = True .Async = False .Load "C:\Program Files (x86)\Homeseer HS4\scripts\traffic.xml" End With[/B] objNodes = objXML.SelectNodes("/channel/item/description") For Each objNode In objNodes hs.writelog("Traffic XML", objNode.ParentNode.GetAttribute("decription")& " " & objNode.Text) Next Catch ex As Exception 'Error trapping hs.WriteLogEx(logName, ex.ToString, "#ff0000") End Try End Sub
Thanks
Will
Comment