make xml content from given text

def __create_xml_request(self, text):
        """ make xml content from given text """
        # create base stucture
        soap_root = ET.Element('soap:Envelope', {
            'xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
            'xmlns:xsd': 'http://www.w3.org/2001/XMLSchema',
            'xmlns:soap': 'http://schemas.xmlsoap.org/soap/envelope/', })
        body = ET.SubElement(soap_root, 'soap:Body')
        process_text = ET.SubElement(body, 'ProcessText', {
            'xmlns': 'http://typograf.artlebedev.ru/webservices/', })
        # add contents
        ET.SubElement(process_text, 'text').text = text
        ET.SubElement(process_text, 'entityType').text = str(self._entityType)
        ET.SubElement(process_text, 'useBr').text = str(self._useBr)
        ET.SubElement(process_text, 'useP').text = str(self._useP)
        ET.SubElement(process_text, 'maxNobr').text = str(self._maxNobr)
        # create tree and write it
        string = Container()
        soap = ET.ElementTree(soap_root)
        soap.write(string, encoding=self._encoding, xml_declaration=True)
        if PY3:
            return string.getvalue().decode(self._encoding)
        return string.getvalue()