Generating a XML compatible hash.