@doclith/xml
v0.6.1
Published
DocLang v0.6 — parsing XML lossless (anti-XXE) et sérialisation AST.
Downloads
93
Readme
@doclith/xml
Lossless DocLang XML parsing (anti-XXE) and serialization (round-trip) for doclith.
Part of doclith — a TypeScript/JS SDK for the DocLang v0.6 format.
Install
pnpm add @doclith/xmlUsage
import { parseDocLang, serializeDocLang } from "@doclith/xml";
const doc = parseDocLang(xml); // → lossless AST (order + mixed text preserved)
const out = serializeDocLang(doc, { pretty: true }); // → string (round-trip)<!DOCTYPE> declarations and external entities are rejected (anti-XXE).
License
Apache-2.0
