private function makeNode($tagName, $tagContent, $attributes = null)
	{
		$nodeText = '';
		$attrText = '';

		if (is_array($attributes))
		{
			foreach ($attributes as $key => $value)
			{
				$attrText .= " $key=\"$value\" ";
			}
		}

		if (is_array($tagContent) && $this->version == self::RSS1)
		{
			$attrText = ' rdf:parseType="Resource"';
		}


		$attrText .= (in_array($tagName, $this->CDATAEncoding) && $this->version == self::ATOM)?
			' type="html" ' : '';
		$nodeText .= (in_array($tagName, $this->CDATAEncoding))?
			"<{$tagName}{$attrText}><![CDATA[" : "<{$tagName}{$attrText}>";

		if (is_array($tagContent))
		{
			foreach ($tagContent as $key => $value)
			{
				$nodeText .= $this->makeNode($key, $value);
			}
		}
		else
		{
			$nodeText .= (in_array($tagName, $this->CDATAEncoding)) ?
				$this->sanitizeCDATA($tagContent) : 
				htmlspecialchars($tagContent);
		}

		$nodeText .= (in_array($tagName, $this->CDATAEncoding))? "]]></$tagName>" : "</$tagName>";

		return $nodeText . PHP_EOL;
	}