function text = tixiXPathExpressionGetTextByIndex(handle, xPathExpression, elementNumber)
    % this file was automatically generated from tixi.h on 2025-09-30

    if (ischar(handle))
        error('Invalid type of argument "handle"');
    end

    if not(ischar(xPathExpression))
        error('Invalid type of argument "xPathExpression"');
    end

    if (ischar(elementNumber))
        error('Invalid type of argument "elementNumber"');
    end

    try
        text = tixi3_matlab('tixiXPathExpressionGetTextByIndex', handle, xPathExpression, elementNumber);
    catch err
        error(err.message)
    end
end

