git404hub

what is docx-sax fr?

anulman/docx-sax — explained in plain English

Analysis updated 2026-05-18

0C#Audience · developerComplexity · 4/5Setup · moderate

tl;dr

A .NET library and CLI/Node/browser tool that streams low level parsing events from inside .docx files instead of returning a finished document object.

vibe map

mindmap
  root((docx-sax))
    Core Library
      OpenXML SDK
      Typed Events
      .NET 8
    Interfaces
      CLI JSONL
      Node Wrapper
      Browser WASM
    Event Types
      Package
      Part
      Relationship
      Element
      Text
    Non Goals
      No Paragraph Model
      No Editing
      No JSON First Core

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Build a custom document processing pipeline that needs raw, low level access to a docx file's internal XML structure.

VIBE 2

Parse uploaded Word documents directly in a browser using the WebAssembly build, without sending files to a server.

VIBE 3

Stream large docx files as JSONL events from the command line for logging or downstream processing.

VIBE 4

Use the Node.js wrapper to inspect docx file internals as part of a document conversion or validation tool.

what's the stack?

.NET 8C#Open XML SDKNode.jsWebAssemblyNext.js

how it stacks up fr

anulman/docx-saxatrblizzard/vtmb-sbox-mounterdiqezit/jarsmartfill
Stars000
LanguageC#C#C#
Setup difficultymoderatemoderateeasy
Complexity4/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · moderate time til it works · 1h+

Requires the .NET 8 SDK and, for the browser build, Node.js and Playwright/Vite tooling for the WASM demo.

in plain english

docx-sax is a developer tool for reading the internal structure of Word docx files. Instead of giving you a finished document object with paragraphs and headings, it streams out low level events as it walks through the file's OpenXML package: when a part starts and ends, what relationships exist between files inside the package, when an XML element opens or closes, and when text is found. It keeps details like namespaces, attribute values, file paths, and event order intact, which makes it useful for people who need precise control over how a docx file is parsed rather than a simplified summary. The core is a .NET 8 library built on Microsoft's Open XML SDK. Around that core, the project offers several ways to use the parser depending on your platform. There is a command line tool that outputs one JSON event per line, a Node.js wrapper that reads docx files from disk, and a browser wrapper built on WebAssembly that reads file bytes directly, useful for parsing uploaded documents in a web page without a server round trip. All three interfaces share the same event structure, so code written against one behaves consistently across the others. The project is explicit about what it will not do. It has no interest in offering paragraph or heading level concepts, no document editing or authoring features, and no JSON first design in its core library. It is meant purely as a low level walker over the file format, leaving any higher level interpretation to whoever uses it. The repository includes a Next.js demo app that shows the browser version parsing an uploaded docx file live. Development uses standard dotnet and npm tooling, with a continuous integration setup that builds and tests across Linux, Windows, and macOS. The project is still early stage, versioned in the 0.x range while its event format continues to change, and it recommends prerelease version numbers until the API is considered stable.

prompts (copy fr)

prompt 1
I want to parse a .docx file's internal OpenXML structure as a stream of events instead of loading the whole document into memory. Show me how a SAX style parser for XML works and how it would apply to docx files.
prompt 2
Explain the relationship between a docx package, its parts, and its relationships in the OpenXML format.
prompt 3
Write a Node.js script that consumes an async iterable of typed events from a document parser and counts how many text nodes appear at each depth.
prompt 4
How would I parse a docx file entirely in the browser using WebAssembly instead of uploading it to a server first?
prompt 5
I need to build a JSONL output format from a stream of typed parser events. Show me a pattern for serializing each event as one line of JSON reliably.

Frequently asked questions

what is docx-sax fr?

A .NET library and CLI/Node/browser tool that streams low level parsing events from inside .docx files instead of returning a finished document object.

What language is docx-sax written in?

Mainly C#. The stack also includes .NET 8, C#, Open XML SDK.

How hard is docx-sax to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is docx-sax for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.