How to convert text document to xml