def as_xml(self,parent):
n=parent.newChild(None,self.name.upper(),None)<EOL>if self.type:<EOL><INDENT>n.newTextChild(None,"<STR_LIT>",self.type)<EOL><DEDENT>n.newTextChild(None,"<STR_LIT>",binascii.b2a_base64(self.cred))<EOL>return n<EOL>
Create vcard-tmp XML representation of the field.

        :Parameters:
            - `parent`: parent node for the element
        :Types:
            - `parent`: `libxml2.xmlNode`

        :return: xml node with the field data.
        :returntype: `libxml2.xmlNode`