public function __construct(\DOMElement $xml = null)
{
if ($xml === null) {
return;
}
$this->DisplayName = Utils::extractLocalizedStrings($xml, self::NS, 'DisplayName');
$this->Description = Utils::extractLocalizedStrings($xml, self::NS, 'Description');
$this->InformationURL = Utils::extractLocalizedStrings($xml, self::NS, 'InformationURL');
$this->PrivacyStatementURL = Utils::extractLocalizedStrings($xml, self::NS, 'PrivacyStatementURL');
foreach (Utils::xpQuery($xml, './*') as $node) {
if ($node->namespaceURI === self::NS) {
switch ($node->localName) {
case 'Keywords':
$this->Keywords[] = new Keywords($node);
break;
case 'Logo':
$this->Logo[] = new Logo($node);
break;
}
} else {
$this->children[] = new Chunk($node);
}
}
}