XML representation, parsing and more for SML