@federicocarboni/saxe
    Preparing search index...

    Interface SaxHandler

    interface SaxHandler {
        comment?(content: string): void;
        doctype?(doctype: Doctype): void;
        endCDataSection?(): void;
        endTag(name: string): void;
        processingInstruction?(target: string, content: string): void;
        startCDataSection?(): void;
        startTag(name: string, attributes: Attributes): void;
        text(content: string): void;
        xmlDecl?(xmlDecl: XmlDeclaration): void;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • A comment.

      <!-- content -->
      

      Parameters

      • content: string

        Comment content, whitespace is not trimmed or normalized.

      Returns void

    • Document type declaration.

      <!DOCTYPE example PUBLIC "-//Example//example" "./example.dtd">
      

      This handler is called before parsing any markup declarations.

      Parameters

      Returns void

    • An end tag.

      </element>
      

      Parameters

      • name: string

        Name of the element.

      Returns void

    • A processing instruction.

      <?target content?>
      

      Parameters

      • target: string

        Processing instruction target, used to identify the application to which the instruction is directed.

      • content: string

        Processing instruction content, whitespace is not trimmed or normalized.

      Returns void

    • Start tag.

      <element attr="value">
      

      Parameters

      • name: string

        Name of the element.

      • attributes: Attributes

        Attributes of the tag.

      Returns void

    • Text content.

      <element>
      content
      </element>

      By default, the parser collects text content as if it were forming a DOM Text Node. SaxOptions.incrementalText may be used to emit text events as soon as more data is available.

      Parameters

      • content: string

        Text content.

      Returns void