public static function loadFromXML(ProtectedXMLReader $reader)
	{
		if($reader == null)
			return null;
		$entry = new Entry();
		$d = $reader->depth();
		while($reader->read($d))
		{
			if($reader->isElement(Database::XML_UUID))
				$entry->uuid = $reader->readTextInside();
			elseif($reader->isElement(Database::XML_ICONID))
				$entry->icon = $reader->readTextInside();
			elseif($reader->isElement(Database::XML_CUSTOMICONUUID))
				$entry->customIcon = $reader->readTextInside();
			else if($reader->isElement(Database::XML_TAGS))
				$entry->tags = $reader->readTextInside();
			elseif($reader->isElement(Database::XML_STRING))
				$entry->readString($reader);
			elseif($reader->isElement(Database::XML_HISTORY))
			{
				$historyD = $reader->depth();
				while($reader->read($historyD))
				{
					if($reader->isElement(Database::XML_ENTRY))
						$entry->addHistoryEntry(self::loadFromXML($reader));
				}
			}
		}
		return $entry;
	}