protected function arrayToXML(array $data, &$output)
	{
		foreach ($data as $key => $value)
		{
			if (is_array($value))
			{
				if (! is_numeric($key))
				{
					$subnode = $output->addChild("$key");
					$this->arrayToXML($value, $subnode);
				}
				else
				{
					$subnode = $output->addChild("item{$key}");
					$this->arrayToXML($value, $subnode);
				}
			}
			else
			{
				$output->addChild("$key", htmlspecialchars("$value"));
			}
		}
	}