Add language metadata and improve xml tests