Open topic with navigation

# parse_document_idx

The `parse_document_idx` function parses an IDX file into documents and calls a function on each document.

## Syntax

    parse_document_idx( filename, handler )

## Arguments

Argument | Description
--- | ---
`filename` | (string) The path and file name of the IDX file to parse into documents.
`handler` | (document_handler_function) The function to call on each document that is parsed from the IDX file. The function must accept a LuaDocument as the only argument.

## Example

The following example uses the `parse_document_idx` function to parse an IDX file, and calls the function `appendDocumentReference` on each document.

    local references = {}

    function appendDocumentReference(document)
        table.insert(references, document:getReference())
    end

    function read_idx_references(filename)
        parse_document_idx(filename, appendDocumentReference)
        return references
    end

## Returns

Nil.

© 2018 Micro Focus or one of its affiliates | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm