Returns an InputStreamReader from a file using the specified encoding.
 

1 file.cstream.reader

<file.cstream.reader encoding='encoding'>
    <file /> !
</file.cstream.reader>
Example

Read a file with the encoding ISO-8859-1 and process it line by line.

Copy
<xsql-script name='file_cstream_reader'>
    <body>
        <set name='m_in'>
            <string.lineReader>
                <file.cstream.reader encoding='ISO-8859-1'>
                    <file name='/tmp/file_iso.txt' type='absolute' />
                </file.cstream.reader>  
            </string.lineReader>
        </set>

        <while>
            <expr>
                <isnotnull>
                    <set name='m_line'>
                        <string.lineReader.readLine><m_in/></string.lineReader.readLine>
                    </set>
                </isnotnull>
            </expr>
            <do>
                <println>
                    <m_line />
                </println>
            </do>
        </while>
    </body>
</xsql-script>