kernl API
    Preparing search index...

    Function readNzbDocument

    • Validates one NZB document without handing it to an XML library: the shell runs where there is no DOMParser, and a strict scanner cannot be talked into loading a DTD or expanding an entity (NAP-NZB, Submission). Accepted is well-formed XML within the shell's bounds whose root is nzb in the NZB namespace and which lists at least one file with a segment. An external doctype is read past and never fetched; an internal subset, any declaration, any entity beyond XML's five and any processing instruction are refused.

      Parameters

      • bytes: Uint8Array

        The document as it will be handed to the downloader.

      Returns NzbDocument

      The number of files listed and a display name from the document's own title.

      invalid:nzb followed by plain words for what was wrong.

      readNzbDocument(bytes); // { files: 2, name: 'Holiday film (2019)' }