you could try reading...
As specifically stated, you don't need to work with binary variables here. I agree with argv, mostly. As usual his code could enjoy a few touches, though:
on *:SOCKREAD:sock: {
if ($sockerr > 0) { return }
while ($parseline > 0) {
noop
}
}
alias parseline {
sockread %line
if ($sockbr == 0) return 0
if ($sock($sockname).mark) {
write file.xml $1-
}
else if (%line == $null) sockmark $sockname $true
return $sockbr
}
The error as you pasted it shows the problem already:
<JoinedDate>0001-01-01T00:00:00-08:00</JoinedDate><ExpirationDate>0001-01-01T00:00:00</ExpirationDate&g...
... What's that
&g... in there?

I'm guessing > you're going to need to unescape things like that, of course.