rdocx-oxml
rdocx-oxml provides typed WordprocessingML parts for tools that need
schema-level control. It accepts namespace aliases, serializes children in
schema order, and retains unmodelled XML alongside typed edits.
Capabilities
- Document bodies, paragraphs, runs, tables, styles, and numbering.
- Headers, footers, notes, comments, revisions, and content controls.
- Transitional OfficeMath parsing and serialization.
- Prefix-tolerant input, schema-ordered output, and raw preservation state.
- Complete paragraph and run properties, multilingual and vertical text, conditional and floating tables, section semantics, settings, and web settings.
Measured footprint and speed
| Measurement | Value | Version | Platform | Build mode | Input | Command | Statistic | Measured on |
|---|---|---|---|---|---|---|---|---|
| Crates.io archive: rdocx-oxml | 535,507 compressed bytes, 3,300,433 member bytes, 32 members | 0.16.2 | macOS 26.6.2, Apple M5 Max, arm64 | cargo publish --workspace --dry-run --allow-dirty --locked |
Tracked rdocx-oxml 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 a tool already owns the XML model. Most applications should
use the package-preserving rdocx facade instead.
Relationship
rdocx owns complete DOCX packages and uses these types for WordprocessingML
parts. The shared oxml-* crates remain format-neutral.
Example
use ;
let mut document = new;
let mut paragraph = CT_Pnew;
paragraph.add_run;
document.body.content.push;
assert_eq!;
[]
= "0.16.2"