Returns a list with the first lines of a file. The number of lines should be indicated in the attribute lines.
 

1 file.head

<file.head lines='lines'>
    <file /> !
</file.head>
Example

get the first 10 lines of a file.

Copy
<xsql-script name='file_head_sample1'>
    <body>
        <set name='m_srcfile'>
            <string>c:<file.separator />source<file.separator />deister.txt</string>
        </set>
        <println>

        <set name='arr'>
            <file.head lines='10'>
                <file  name='#m_srcfile' type='absolute' />
            </file.head>
        </set>

        <println>
            <arr/>
        </println>

        <iterator name='line' index='idx'>
            <in>
                <arr/>
            </in>
            <do>
                <println><idx/>: <line /></println>
            </do>
        </iterator>

        <println>
    </body>
</xsql-script>