def serialize_value(self, parent_elem, value):
if isinstance(value, (str, int)) or type(value).__name__ == '<STR_LIT:str>':<EOL><INDENT>parent_elem.text = str(value)<EOL><DEDENT>elif value is None:<EOL><INDENT>parent_elem.text = None<EOL><DEDENT>else:<EOL><INDENT>parent_elem.append(value.serialize(self))<EOL><DEDENT>
Serializes str, Attrib, or PathAttrib objects.

Example::

    <attribute>foobar</attribute>