partial-xml-stream-parser
Version:
A lenient XML stream parser for Node.js and browsers that can handle incomplete or malformed XML data, with depth control, CDATA support for XML serialization and round-trip parsing, wildcard pattern support for stopNodes, and CDATA handling within stopNo
15 lines • 919 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_STREAM_OPTIONS = void 0;
// Default options relevant to the lenient streaming parser
exports.DEFAULT_STREAM_OPTIONS = {
textNodeName: "#text", // Key for text content when a tag has other children or for consistency
attributeNamePrefix: "@", // Prefix for attribute names in the parsed object
stopNodes: [], // Array of tag names that should not have their children parsed
maxDepth: null, // Maximum nesting depth; tags beyond this depth are treated like stopNodes
alwaysCreateTextNode: true, // If true, text content is always in a #text node. Changed default for performance.
parsePrimitives: false, // If true, attempts to parse numbers and booleans
allowedRootNodes: null, // Allowed root nodes
ignoreWhitespace: false, // Whether to ignore whitespace
};
//# sourceMappingURL=options.js.map