Contributions
Not able to find the nodes object when tried to read xml file
Hello all, I try to read a xml file. I get the DOM Doc object, but I can't get node or nodes list by using any method or property. Here is the code: def GetDomDocFromXML(fileLocation): domObj = Sys.OleObject["Msxml2.DOMDocument.6.0"] domObj.setProperty("ProhibitDTD",False) domObj.async = False domObj.load(fileLocation) # Report an error, if, for instance, the markup or file structure is invalid if domObj.parseError.errorCode != 0: s = "Reason:\t" + Doc.parseError.reason + "\n" + "Line:\t" + aqConvert.VarToStr(Doc.parseError.line) + "\n" + "Pos:\t" + aqConvert.VarToStr(Doc.parseError.linePos) + "\n" + "Source:\t" + Doc.parseError.srcText # Post an error to the log and exit Log.Error("Cannot parse the document.", s) else: return domObj def CheckCytovilleModeTableFile(): dict = {} path = PathPrefix + "FluidicsdModeTable\\CytovilleModeTable.xml" doc = GetDomDocFromXML(path) rootNode = doc.documentElement nodes = rootNode.childNodes I've triedselectSingleNode,getElementsByTagName, none of them work. Log picture is in attach file.Solved833Views0likes1CommentTested Application stucks, the playback also stucks. Unable to detect the error.
The tested application stucks with some kind of defect. The application is still running, but user unable to do anything with it. Just like the application window is locked. At this time, the playback is also stucks, it doesn't move to the next step, not throw an error, and even can't pause it. Because of the playback stucks, normal error handlers not work. Does TC have any way to detect this kind of issue?Solved1.6KViews0likes3Comments