def __init__(self,name, value, rfc2425parameters = None, empty_ok = False):
        """Initialize a `VCardString` object.

        :Parameters:
            - `name`: field name
            - `value`: field value as string or an XML node
            - `rfc2425parameters`: optional RFC 2425 parameters
        :Types:
            - `name`: `str`
            - `value`: `str` or `libxml2.xmlNode`
            - `rfc2425parameters`: `dict`"""
        _unused = rfc2425parameters
        VCardField.__init__(self,name)
        if isinstance(value,libxml2.xmlNode):
            value=value.getContent()
            if value:
                self.value=unicode(value,"utf-8","replace").strip()
            else:
                self.value=u""
        else:
            self.value=value
        if not self.value and not empty_ok:
            raise Empty("Empty string value")
def __init__ ( self , name , value , rfc2425parameters = None , empty_ok = False ) : _unused = rfc2425parameters VCardField . __init__ ( self , name ) if isinstance ( value , libxml2 . xmlNode ) : value = value . getContent ( ) if value : self . value = unicode ( value , "utf-8" , "replace" ) . strip ( ) else : self . value = u"" else : self . value = value if not self . value and not empty_ok : raise Empty ( "Empty string value" )
Initialize a `VCardString` object.

        :Parameters:
            - `name`: field name
            - `value`: field value as string or an XML node
            - `rfc2425parameters`: optional RFC 2425 parameters
        :Types:
            - `name`: `str`
            - `value`: `str` or `libxml2.xmlNode`
            - `rfc2425parameters`: `dict`