Return an array of bytes with the content of the file passed as argument.

1 file.bytes.read

<file.bytes.read />
Example

Emit the file content by the console.

Copy
<xsql-script name='file_bytes_read_sample1'>
    <body>
        <println>
            <string><file.bytes.read><file name='test.xml' type='absolute' /></file.bytes.read></string>
        </println>
    </body>
</xsql-script>
Example

Store a file in the BD.

Copy
<xsql-script name='file_bytes_read_sample1'>
   <body>

       <!-- Generates the SVG in the intermediate file -->
       <file.writer.open id='out1' encoding='ISO-8859-1'>
           <file name='filesample.txt' type='temp' />
       </file.writer.open>

       <file.writer.println id='out1'>
           <string>Test text for the file</string>
       </file.writer.println>

       <file.writer.close id='out1' />

       <update table='tablesample'>
           <column name='colsample'>
               <file.bytes.read>
                   <file name='filesample.txt' type='temp' />
               </file.bytes.read>
           </column>
           <where>
               colcode = 1
           </where>
       </update>

   </body>

</xsql-script>