

def writexml(self, stream, indent='', addindent='', newl='', strip=0, nsprefixes={
    
}, namespace=''):
    if self.raw:
        val = self.nodeValue
        if (not isinstance(val, StringTypes)):
            val = str(self.nodeValue)
    else:
        v = self.nodeValue
        if (not isinstance(v, StringTypes)):
            v = str(v)
        if strip:
            v = ' '.join(v.split())
        val = escape(v)
    if isinstance(val, UnicodeType):
        val = val.encode('utf8')
    stream.write(val)

dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/microdom.py Text.writexml/original