Python object XML serialization