Improvements to xml snippets by jhradilek