A XmlInputProvider implementation that reads from buffers.

This can be passed to xmlRegisterInputProvider to read XML content from memory.

Implements

Constructors

Methods

  • Add a buffer to the provider.

    Parameters

    • filename: string

      The filename of the buffer.

    • buffer: Uint8Array

      The buffer to add.

    Returns void

  • Determine if this input provider should handle this file.

    Parameters

    • filename: string

      The file name/path/url

    Returns boolean

    true if the provider should handle it.

  • Open the file and return a file descriptor (handle) representing the file.

    Parameters

    • filename: string

      The file name/path/url

    Returns number

    undefined on error, number on success.

  • Read from the file.

    Parameters

    • fd: number

      File descriptor

    • buffer: Uint8Array

    Returns number

    number of bytes actually read, -1 on error.

  • Remove a buffer from the provider.

    Parameters

    • filename: string

      The filename of the buffer to remove.

    Returns void