Out server sends responses in this format (XML)
<RETURN>
<INFO COUNT="number">
</RETURN>
number is 0 for error, or something greater than zero if it works OK.
I would like to make a kal script for it.
So i tried (only socket commands)
! 1 - started it with <RETURN>?
socket waitfor ${SOCKET} "<RETURN>"
! 2 - is correctly ended with </RETURN>?
socket waitfor ${SOCKET} "</RETURN>"
! 3 - contains <INFO COUNT=" element?
! <INFO COUNT="
socket waitfor ${SOCKET} "3C494E464F20434F554E543D223022" raw
And there is problem. In point 3 it always fails. It looks that waitfor reads socket data from place where it ends last time.
So I exchanged 2 and 3. But now I have same problem. I need check if there is <INFO COUNT=" and if there is <INFO COUNT="0"> or something else.
Does anyone have idea how to do that?