Help with XML parsing

I am trying to get a Boolean value return if the repairstatus is 1 and the name is Tool1, but I am having no luck getting the logic worked out. Any help would be appreciated.

<wsconfig>
<sectools>
<sectool>
<name>Tool1</name>
<services>
<service>
<serviceName>ProtectSvc</serviceName>
<startup>Automatic</startup>
</service>
<service>
<serviceName>SboxSvc</serviceName>
<startup>Automatic</startup>
</service>
</services>
<processes>
<process>C:\Program Files (x86)\Enterprise\X64\</process>
</processes>
<logs>
<logDir checkTimeStamp="true">%LOCALAPPDATA%\Enterprise</logDir>
<logDir>C:\Windows\Temp\</logDir>
</logs>
<repairStatus>1</repairStatus>
<installActionId>0</installActionId>
</sectool>

It looks a little malformed - I don’t see the closing tags for “sectools” or “wsconfig”. What have you tried so far?


When I test it, I get an error converting to XML. Do you get the same?

q: xml document of file "c:\temp\test.xml"
E: The expression could not be evaluated: XMLDomDocumentError: The following tags were not closed: wsconfig, sectools.

If you get the closing tags added correctly, I think the following should do what you need:

q: exists selects "wsconfig/sectools/sectool" whose ( (node value of child node of select "name" of it = "Tool1") of it AND node value of child node of select "repairStatus" of it = "1")   of xml document of file "c:\temp\test.xml"
A: True
T: 0.811 ms

Perfect that was just what I needed! Thanks! I was close!