public function setFields(&$elements, $group = null, $replace = true)
	{
		// Make sure there is a valid Form XML document.
		if (!($this->xml instanceof SimpleXMLElement))
		{
			// TODO: throw exception.
			return false;
		}

		// Make sure the elements to set are valid.
		foreach ($elements as $element)
		{
			if (!($element instanceof SimpleXMLElement))
			{
				// TODO: throw exception.
				return false;
			}
		}

		// Set the fields.
		$return = true;
		foreach ($elements as $element)
		{
			if (!$this->setField($element, $group, $replace))
			{
				$return = false;
			}
		}

		// Synchronize any paths found in the load.
		$this->syncPaths();

		return $return;
	}