keepassphp/lib/group.php
public static function loadFromXML(ProtectedXMLReader $reader)
	{
		if($reader == null)
			return null;
		$group = new Group();
		$d = $reader->depth();
		while($reader->read($d))
		{
			if($reader->isElement(Database::XML_GROUP))
				$group->addGroup(Group::loadFromXML($reader));
			elseif($reader->isElement(Database::XML_ENTRY))
				$group->addEntry(Entry::loadFromXML($reader));
			elseif($reader->isElement(Database::XML_UUID))
				$group->uuid = $reader->readTextInside();
			elseif($reader->isElement(Database::XML_NAME))
				$group->name = $reader->readTextInside();
			elseif($reader->isElement(Database::XML_ICONID))
				$group->icon = $reader->readTextInside();
			elseif($reader->isElement(Database::XML_CUSTOMICONUUID))
				$group->customIcon = $reader->readTextInside();
		}
		return $group;
	}
public static function loadFromXML(ProtectedXMLReader $reader)
	{
		if($reader == null)
			return null;
		$group = new Group();
		$d = $reader->depth();
		while($reader->read($d))
		{
			if($reader->isElement(Database::XML_GROUP))
				$group->addGroup(Group::loadFromXML($reader));
			elseif($reader->isElement(Database::XML_ENTRY))
				$group->addEntry(Entry::loadFromXML($reader));
			elseif($reader->isElement(Database::XML_UUID))
				$group->uuid = $reader->readTextInside();
			elseif($reader->isElement(Database::XML_NAME))
				$group->name = $reader->readTextInside();
			elseif($reader->isElement(Database::XML_ICONID))
				$group->icon = $reader->readTextInside();
			elseif($reader->isElement(Database::XML_CUSTOMICONUUID))
				$group->customIcon = $reader->readTextInside();
		}
		return $group;
	}
public static function loadFromXML ( ProtectedXMLReader $ reader ) { if ( $ reader == null ) return null ; $ group = new Group ( ) ; $ d = $ reader -> depth ( ) ; while ( $ reader -> read ( $ d ) ) { if ( $ reader -> isElement ( Database :: XML_GROUP ) ) $ group -> addGroup ( Group :: loadFromXML ( $ reader ) ) ; elseif ( $ reader -> isElement ( Database :: XML_ENTRY ) ) $ group -> addEntry ( Entry :: loadFromXML ( $ reader ) ) ; elseif ( $ reader -> isElement ( Database :: XML_UUID ) ) $ group -> uuid = $ reader -> readTextInside ( ) ; elseif ( $ reader -> isElement ( Database :: XML_NAME ) ) $ group -> name = $ reader -> readTextInside ( ) ; elseif ( $ reader -> isElement ( Database :: XML_ICONID ) ) $ group -> icon = $ reader -> readTextInside ( ) ; elseif ( $ reader -> isElement ( Database :: XML_CUSTOMICONUUID ) ) $ group -> customIcon = $ reader -> readTextInside ( ) ; } return $ group ; }
Creates a new Group instance from a ProtectedXMLReader instance reading
a KeePass 2.x database and located at a Group element node.
@param $reader A XML reader.
@return A Group instance if the parsing went okay, null otherwise.
Creates a new Group instance from a ProtectedXMLReader instance reading a KeePass 2 . x database and located at a Group element node .