public static function fromXml(\DOMElement $xml)
    {
        $static = new static();
        $static->libraryItemMetadata = LibraryItemMetadata::fromXml($xml);
        $static->renewable = Renewable::fromXml($xml);

        $loanDate = $xml->getElementsByTagName('loanDate');
        $static->loanDate = DateTime::fromXml($loanDate);

        $dueDate = $xml->getElementsByTagName('dueDate');
        $static->dueDate = DateTime::fromXml($dueDate);

        $returnedDate = $xml->getElementsByTagName('returnedDate');
        $static->returnedDate = DateTime::fromXml($returnedDate);

        $stringLiterals = array(
            'pbsCode' => $xml->getElementsByTagName('pbsCode'),
            'itemSequence' => $xml->getElementsByTagName('itemSequence'),
            'material' => $xml->getElementsByTagName('material'),
        );
        foreach ($stringLiterals as $propertyName => $xmlTag) {
            $static->$propertyName = StringLiteral::fromXml($xmlTag);
        }

        return $static;
    }