The parse_document_idx
function parses an IDX string or file, and returns a LuaDocument.
You can use this function if the string or file contains a single document. If you have an IDX file that contains multiple documents you can use the function parse_document_idx(filename, handler)
instead.
parse_document_idx( input, file )
Argument | Description |
---|---|
input
|
(string) The string or path to the file that contains the document in IDX format. |
file
|
(boolean, default false ) Specifies whether the input argument is a path to a file. |
If you have a string named myIdxString
that contains a document in IDX format, you can obtain a LuaDocument object as follows:
local myDocument = parse_document_idx(myIdxString)
(LuaDocument). A LuaDocument object that represents the document.
|