Create a capture mechanism that could read output and store its value into a variable.
A "capture" command could be called to populate the variable with data from the automated application.
<xh-capture stream="stdout" task="-1" varname="var1" capture="REGULAR EXPRESSION HERE"/>
What ever is matched by the Regular Expression is placed into var1.
XHarness should then be able to use the value of var1 in later expressions.