oxml-opc
Read, mutate, and write the Open Packaging Conventions layer used by OOXML files.
Capabilities
- ZIP package parts with configurable read limits.
- Content type defaults and overrides.
- Relationship parsing, target resolution, and mutation.
- Main-document discovery, part navigation, and package preservation.
- Case-insensitive package identity, atomic save, agile encryption, and XML signature verification cover the container boundary below both facades.
Measured footprint and speed
The archive row is regenerated from the package that carries this README.
| Measurement | Value | Version | Platform | Build mode | Input | Command | Statistic | Measured on |
|---|---|---|---|---|---|---|---|---|
| Crates.io archive: oxml-opc | 110,291 compressed bytes, 445,033 member bytes, 12 members | 0.14.2 | macOS 26.6.2, Apple M5 Max, arm64 | cargo publish --workspace --dry-run --allow-dirty --locked |
Tracked oxml-opc package inventory |
python3 scripts/readme_doctests.py --record-measurements |
gzip archive bytes, tar member bytes, tar member count | 2026-10-16 |
Use it when
Use this crate when implementing an OOXML package reader or writer. Use rdocx or rpptx for complete document APIs.
Relationship
This is the shared successor to the deprecated rdocx-opc shim and is used by
both document families. OPC manages containers, parts, and relationships. It
does not interpret document-format XML. Encryption and digital signature APIs
are optional feature-gated capabilities.
Example
use ContentTypes;
let content_types = from_xml?;
assert_eq!;
# Ok::
Add oxml-opc = "0.14.2" to your dependencies. Start with the package API documentation.