keepassphp/lib/entry.php
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;
	}
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;
	}
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 ; }
Creates a new Entry instance from a ProtectedXMLReader instance reading
a KeePass 2.x database and located at an Entry element node.
@param $reader A XML reader.
@return A Entry instance if the parsing went okay, null otherwise.
Creates a new Entry instance from a ProtectedXMLReader instance reading a KeePass 2 . x database and located at an Entry element node .