i want to converter xml on the fly like converter = xml2json(message, encoding="utf-8") I wanted to convert xml from a variable rather than file as explained in the examples.