public function saveXML($path_or_resource, $mode = 'wb', $todo_for_empty_elements = QuickBooks_XML::XML_COMPRESS)
	{
		$xml = $this->asXML($todo_for_empty_elements);

		if (is_resource($path_or_resource))
		{
			return fwrite($path_or_resource, $xml);
		}

		$fp = fopen($path_or_resource, $mode);
		$bytes = fwrite($fp, $xml);
		fclose($fp);

		return $bytes;
	}