function _serializeValue($value, $tagName = null, $attributes = array())
{
if (is_array($value)) {
$xml = $this->_serializeArray($value, $tagName, $attributes);
} elseif (is_object($value)) {
$xml = $this->_serializeObject($value, $tagName);
} else {
$tag = array('qname' => $tagName, 'attributes' => $attributes, 'content' => $value);
$xml = $this->_createXMLTag($tag);
}
return $xml;
}