Convert :class:`.MARCXMLRecord` object to :class:`.EPublication`
        namedtuple.

        Args:
            xml (str/MARCXMLRecord): MARC XML which will be converted to
                EPublication. In case of str, ``<record>`` tag is required.

        Returns:
            structure: :class:`.EPublication` namedtuple with data about \
                       publication.

def from_xml(xml):
        """
        Convert :class:`.MARCXMLRecord` object to :class:`.EPublication`
        namedtuple.

        Args:
            xml (str/MARCXMLRecord): MARC XML which will be converted to
                EPublication. In case of str, ``<record>`` tag is required.

        Returns:
            structure: :class:`.EPublication` namedtuple with data about \
                       publication.
        """
        parsed = xml
        if not isinstance(xml, MARCXMLRecord):
            parsed = MARCXMLRecord(str(xml))

        # check whether the document was deleted
        if "DEL" in parsed.datafields:
            raise DocumentNotFoundException("Document was deleted.")

        # i know, that this is not PEP8, but you dont want to see it without
        # proper formating (it looks bad, really bad)
        return EPeriodical(
            url=parsed.get_urls(),
            ISSN=parsed.get_ISSNs(),
            nazev=parsed.get_name(),
            anotace=None,  # TODO: read the annotation
            podnazev=parsed.get_subname(),
            id_number=parsed.controlfields.get("001", None),
            datumVydani=parsed.get_pub_date(),
            mistoVydani=parsed.get_pub_place(),
            internal_url=parsed.get_internal_urls(),
            invalid_ISSNs=parsed.get_invalid_ISSNs(),
            nakladatelVydavatel=parsed.get_publisher(),
            ISSNSouboruPublikaci=parsed.get_linking_ISSNs(),
        )