Saturday 9 July 2022

The use of XML in manifest files

XML is a popular choice for writing manifest files. Manifest files contain metadata for a group of accompanying files that form part of a coherent unit. A computer program you produce may include a manifest file to capture program name, version number, author and license information as well as constituent files. The term is borrowed from logistics, where the term ship manifest is used (to enumerate the cargo, passengers and crew on the ship for inspection by customs or other officials).

A .nuspec files is an XML manifest used by the nuget packaging system. Its format is specified by a nuspec.xsd schema file. There is mandatory metadata as well as optional metadata, which must all appear within the <metadata> element. First off you need an id, which must be unique across nuget.org, and is limited to 128 characters (16 octets). Then you need a version, which must follow the major.minor.patch format, and a description which is limited to 4000 characters, used for UI display.

No comments: