[Content_Types].xml management for the OPC package.
Tracks default content types (by file extension) and override content types (by part name) and renders them to the XML expected at the package root.
Summary
Functions
Adds a default content type for a file extension.
Adds an override content type for a specific part.
Parses a [Content_Types].xml string into a %ContentTypes{}.
Generates the [Content_Types].xml string.
Types
Functions
Adds a default content type for a file extension.
Extensions are downcased so a template declaring Extension="PNG" and a part
added as "png" do not produce two conflicting Default entries.
Adds an override content type for a specific part.
Parses a [Content_Types].xml string into a %ContentTypes{}.
Attributes are matched individually so their order in the source does not
matter. Extension values are downcased because OPC extension matching is
case-insensitive.
Generates the [Content_Types].xml string.