File Content Extraction 26.1
XML Export SDK Java Programming Guide

# XmlConvStreamToStream

This program converts an input stream to an output stream using Java API calls in XML Export, and a template file. See Explore Conversion Options with the Sample Programs for more information on templates.

NOTE: This sample program demonstrates how to export from a `java.io.InputStream` object. However, OpenText recommends that you implement a `com.verity.api.SeekableInputStream` and pass this into File Content Extraction instead. OpenText recommends this option because it allows File Content Extraction to seek in the file, only reading the parts it needs to read. For more information, see Input/Output Operations.

## Run XmlConvStreamToStream on Windows

To run XmlConvStreamToStream on Windows

1. In the file `XmlConvStreamToStream.bat`, set the following variables.

   `INSTALL_DIR` | The absolute path of the File Content Extraction Export SDK installation directory.
   `PLATFORM` | The platform name.

2. In `XmlSampleConfig.txt`, specify the following values, one on each line.

   Line | Value
   --- | ---
   1 | The path to the template file to use in the conversion. You can use the template files in the directory `install\xmlexport\programs\ini`, where `install` is the Export SDK installation directory.
   2 | The path to the Export SDK `bin` directory.

3. Run the batch file in the `install\javaapi\sample` directory. Type the following:

       XmlConvStreamToStream inputfile

   where `inputfile` is the path of the source file.

   The generated XML is output to the current console (standard out).

## Run XmlConvStreamToStream on UNIX

To run XmlConvStreamToStream on UNIX

1. In the file `XmlConvStreamToStream.csh`, set the following variables.

   `INSTALL_DIR` | The absolute path of the File Content Extraction Export SDK installation directory.
   `PLATFORM` | The platform name.

2. In `XmlSampleConfig.txt`, specify the following values, one on each line.

   Line | Value
   --- | ---
   1 | The path to the template file to use in the conversion. You can use the template files in the directory `install\xmlexport\programs\ini`, where `install` is the Export SDK installation directory.
   2 | The path to the Export SDK `bin` directory.

3. Run the C shell file in the `install/javaapi/sample` directory. Type the following:

       ./XmlConvStreamToStream.csh inputfile

   where `inputfile` is the path of the source file.

   The generated XML is output to the current console (standard out).

Copyright 1997-2025 Open Text
Version 26.1 | Last updated January 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: File Content Extraction 26.1

Topic Title: XmlConvStreamToStream