Further work on SOS implementation, XML input.