code: def cb(self, elt, sw, pyobj, unsuppressedPrefixes=[]):
          
          #if sw.Known(pyobj): 
          #    return
  
          if type(pyobj) in _stringtypes:
              elt.createAppendTextNode(pyobj)
              return
  
          ## grab document and import node, and append it
          doc = elt.getDocument()
          node = doc.importNode(pyobj, deep=1)
          child = elt.node.appendChild(node)
  
          ## copy xmlns: attributes into appended node
          parent = pyobj.parentNode
          while parent.nodeType == _Node.ELEMENT_NODE:
              for attr in filter(lambda a: a.name.startswith('xmlns:') and a.name not in child.attributes.keys(), parent.attributes): 
                  child.setAttributeNode(attr.cloneNode(1))
  
              parent = parent.parentNode
docs: pyobj -- xml.dom.Node.ELEMENT_NODE