keepassphp/lib/database.php
private function parseXML(ProtectedXMLReader $reader)
	{
		$d = $reader->depth();
		while($reader->read($d))
		{
			if($reader->isElement(self::XML_META))
			{
				$metaD = $reader->depth();
				while($reader->read($metaD))
				{
					if($reader->isElement(self::XML_HEADERHASH))
						$this->_headerHash = base64_decode($reader->readTextInside());
					elseif($reader->isElement(self::XML_DATABASENAME))
						$this->_name = $reader->readTextInside();
					elseif($reader->isElement(self::XML_CUSTOMICONS))
					{
						$iconsD = $reader->depth();
						while($reader->read($iconsD))
						{
							if($reader->isElement(self::XML_ICON))
								$this->parseCustomIcon($reader);
						}
					}
				}
			}
			elseif($reader->isElement(self::XML_ROOT))
			{
				$rootD = $reader->depth();
				while($reader->read($rootD))
				{
					if($reader->isElement(self::XML_GROUP))
						$this->addGroup(Group::loadFromXML($reader));
				}
			}
		}
	}
private function parseXML(ProtectedXMLReader $reader)
	{
		$d = $reader->depth();
		while($reader->read($d))
		{
			if($reader->isElement(self::XML_META))
			{
				$metaD = $reader->depth();
				while($reader->read($metaD))
				{
					if($reader->isElement(self::XML_HEADERHASH))
						$this->_headerHash = base64_decode($reader->readTextInside());
					elseif($reader->isElement(self::XML_DATABASENAME))
						$this->_name = $reader->readTextInside();
					elseif($reader->isElement(self::XML_CUSTOMICONS))
					{
						$iconsD = $reader->depth();
						while($reader->read($iconsD))
						{
							if($reader->isElement(self::XML_ICON))
								$this->parseCustomIcon($reader);
						}
					}
				}
			}
			elseif($reader->isElement(self::XML_ROOT))
			{
				$rootD = $reader->depth();
				while($reader->read($rootD))
				{
					if($reader->isElement(self::XML_GROUP))
						$this->addGroup(Group::loadFromXML($reader));
				}
			}
		}
	}
private function parseXML ( ProtectedXMLReader $ reader ) { $ d = $ reader -> depth ( ) ; while ( $ reader -> read ( $ d ) ) { if ( $ reader -> isElement ( self :: XML_META ) ) { $ metaD = $ reader -> depth ( ) ; while ( $ reader -> read ( $ metaD ) ) { if ( $ reader -> isElement ( self :: XML_HEADERHASH ) ) $ this -> _headerHash = base64_decode ( $ reader -> readTextInside ( ) ) ; elseif ( $ reader -> isElement ( self :: XML_DATABASENAME ) ) $ this -> _name = $ reader -> readTextInside ( ) ; elseif ( $ reader -> isElement ( self :: XML_CUSTOMICONS ) ) { $ iconsD = $ reader -> depth ( ) ; while ( $ reader -> read ( $ iconsD ) ) { if ( $ reader -> isElement ( self :: XML_ICON ) ) $ this -> parseCustomIcon ( $ reader ) ; } } } } elseif ( $ reader -> isElement ( self :: XML_ROOT ) ) { $ rootD = $ reader -> depth ( ) ; while ( $ reader -> read ( $ rootD ) ) { if ( $ reader -> isElement ( self :: XML_GROUP ) ) $ this -> addGroup ( Group :: loadFromXML ( $ reader ) ) ; } } } }
Loads the content of a Database from a ProtectedXMLReader instance
reading a KeePass 2.x database and located at a KeePass file element
node.
@param $reader A XML reader.
Loads the content of a Database from a ProtectedXMLReader instance reading a KeePass 2 . x database and located at a KeePass file element node .