@federicocarboni/saxe
    Preparing search index...

    Interface SaxOptions

    interface SaxOptions {
        dtd?: "process" | "prohibit" | "ignore";
        entityProvider?: EntityProvider;
        incompleteTextNodes?: boolean;
        maxAttributesLength?: number;
        maxEntityDepth?: number;
        maxEntityLength?: number;
        maxNameLength?: number;
        maxTextLength?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    dtd?: "process" | "prohibit" | "ignore"

    Set behavior for document type declarations.

    By default, internal document type declarations are processed, so attribute lists declarations apply normalization and default values to attributes and internal entities are recognized and expanded.

    Restricting document type declarations may be preferable where DoS attacks are a concern or where higher priority protocols explicitly prohibit them.

    • "process" - Default, internal declarations are processed normally.
    • "prohibit" - DOCTYPE declarations are prohibited by throwing InvalidDoctypeDecl if the document has one.
    • "ignore" - DOCTYPE declarations are allowed and checked for syntax errors but do not affect parsing of the document.
    "process"
    
    entityProvider?: EntityProvider

    An entity provider to use when the parser has no declaration for an entity.

    incompleteTextNodes?: boolean

    Emit SaxHandler.text as soon as data becomes available.

    By default, the parser collects text content as it were forming a DOM Text Node (or CDATA Section Node), even when text spans multiple chunks. This makes the parser more predictable but delays output until the ending chunk is reached.

    Enabling this option prevents any buffering and causes the parser to emit SaxHandler.text as soon as data becomes available.

    false
    
    maxAttributesLength?: number

    Maximum size allowed for the attributes in a single tag. Counts the total combined length of names and values of attributes.

    10_000_000
    
    maxEntityDepth?: number

    Maximum nesting depth allowed for entities.

    10
    
    maxEntityLength?: number

    Maximum size allowed for an entity value, including nested entities.

    1_000_000
    
    maxNameLength?: number

    Maximum size allowed for a markup identifier. Applies to tag names, public and system identifiers.

    2_000
    
    maxTextLength?: number

    Maximum size allowed for a text node.

    Also applies to comments and processing instructions.

    10_000_000