re-wrote xml parser for socket input.