MySQL to XML fixes