Interface: CcdaParseLimits
Hard safety limits applied to every parse before the XML is handed to the
DOM. Each cap defends a specific denial-of-service vector for hostile XML
(oversized payloads, billion-laughs entity expansion, pathological element
nesting). All four have library defaults; callers may tighten, or, at
their own risk, loosen, any of them via ParseCcdaOptions.limits.
Example
import type { CcdaParseLimits } from "@cosyte/ccda";
const tight: CcdaParseLimits = { maxInputBytes: 1_000_000, maxDepth: 100 };
Properties
maxDepth?
readonlyoptionalmaxDepth?:number
Maximum element nesting depth. Exceeding it throws ELEMENT_DEPTH_LIMIT_EXCEEDED.
maxEntityExpansions?
readonlyoptionalmaxEntityExpansions?:number
Maximum count of &...; entity references permitted in the raw input.
maxInputBytes?
readonlyoptionalmaxInputBytes?:number
Maximum decoded input size in bytes. Exceeding it throws INPUT_SIZE_LIMIT_EXCEEDED.
maxNodeCount?
readonlyoptionalmaxNodeCount?:number
Maximum total element-node count. Exceeding it throws NODE_COUNT_LIMIT_EXCEEDED.