def __init__(self, email_address):
impl = getDOMImplementation()
newdoc = impl.createDocument(None, "Autodiscover", None)
top_element = newdoc.documentElement
top_element.setAttribute("xmlns", "http://schemas.microsoft.com/exchange/autodiscover/mobilesync/requestschema/2006")
req_elem = newdoc.createElement('Request')
top_element.appendChild(req_elem)
email_elem = newdoc.createElement('EMailAddress')
req_elem.appendChild(email_elem)
email_elem.appendChild(newdoc.createTextNode(email_address))
resp_schema = newdoc.createElement('AcceptableResponseSchema')
req_elem.appendChild(resp_schema)
resp_schema.appendChild(newdoc.createTextNode("http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006"))
self.body = newdoc.toxml("utf-8")
self.length = len(self.body)
评论列表
文章目录