XML parsing in action script

(imported topic written by SystemAdmin)

Greetings folks,

I have an XML file thaqt I am trying to get a value out of.

I’m having difficulty with this piece of action script.

parameter "RestartNeeded"="{(node value of child node of select "/TEMAgentStatus/RestartNeeded" of it ) of xml document of file "C:\new_build.xml" }"

This gives me an error

Relevance clauses must be surrounded by { and } guards.

When I run just the relevance part in the fixlet debugger it returns a singular string

I don’t think I am having troubles opening the file and reading it because the following relevance works:

parameter "BBB"="{lines whose (line number of it = 7) of file "C:\WIPS_new_build.xml"}"

Any ideas?

Thanks

(imported comment written by jgolembi)

Can you upload the XML file?

-John G

(imported comment written by SystemAdmin)

Thanks for taking a look.

<?xml version="1.0"?>
<TEMAgentStatus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <LastRestartTime xmlns="http://ESM/">Tue, 09 Oct 2012 12:12:57 -0400</LastRestartTime>
  <RestartNeeded xmlns="http://ESM/">True</RestartNeeded>
  <CompletionStatus xmlns="http://ESM/">False</CompletionStatus>
  <HostName xmlns="http://ESM/">WKST00002A4F</HostName>
  <AgentID xmlns="http://ESM/">16390873</AgentID>
  <Fixlets xmlns="http://ESM/">
<FixletStatus>
  <FixletName>temp fake patch 1</FixletName>
  <FixletState>Pending Restart</FixletState>
</FixletStatus>
  </Fixlets>
</TEMAgentStatus>

(imported comment written by jgolembi)

zpt8mjs,

I could be missing the point of the exercise, but this worked for me…

// Read Parameter from XMLEXAMPLE.TXT
parameter "BBBB" = "{(node value of child node of select "/TEMAgentStatus/RestartNeeded" of it ) of xml document of file "C:\xmlexample.txt" as string = "True"}"
 
// Continue only if the Parameter is not equal to true
continue if {parameter "BBBB" of action as string != "True" }
 
// Launch example EXE
wait example.exe

-John G.