@federicocarboni/saxe
    Preparing search index...

    Interface SaxNamespaceHandler

    interface SaxNamespaceHandler {
        comment?(content: string): void;
        doctype?(doctype: Doctype): void;
        endTag(name: QName, resolver: NamespaceResolver): void;
        entityRef?(name: string, resolver: NamespaceResolver): boolean;
        processingInstruction?(target: string, content: string): void;
        startTag(
            name: QName,
            attributes: NamespaceAttributes,
            resolver: NamespaceResolver,
        ): void;
        text(
            content: string,
            isCDataSection: boolean,
            resolver: NamespaceResolver,
        ): void;
        xmlDecl?(declaration: XmlDeclaration): void;
    }

    Hierarchy

    • SaxPrologHandler
      • SaxNamespaceHandler
    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 doc" "http://example.org/example.dtd">
      

      This handler is called before parsing any markup declarations.

      Parameters

      Returns void

    • A general entity reference.

      <root>
      &entity;
      </root>

      This handler is equivalent to SaxHandler.entityRef except it has access to the namespace resolver of the current element.

      Parameters

      • name: string

        Name of the entity.

      • resolver: NamespaceResolver

        Namespace resolver relative to the current element, should not be used outside the handler.

      Returns boolean

      • Returns true if entity name was recognized. If the function is not defined or returns false the parser throws an UndeclaredEntity error.
    • A processing instruction.

      <?target content?>
      

      Parameters

      • target: string

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

      • content: string

        PI content, whitespace is not trimmed or normalized.

      Returns void

    • Text content.

      <element>
      content
      </element>

      This handler is equivalent to SaxHandler.text except it has access to the namespace resolver of the current element. entityRef.

      Parameters

      • content: string

        Text content.

      • isCDataSection: boolean

        Boolean value true if content originated from a CDATA section or false if it is regular text.

      • resolver: NamespaceResolver

        Namespace resolver relative to the current element, should not be used outside the handler.

      Returns void

    • XML declaration of the document.

      <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
      

      Parameters

      Returns void