KeyView 23.4

# XmlConvFileToFile

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

It demonstrates the following functions:

- Extracts file format information (document type, format, and version) if it is available in the source document.

- Extracts metadata if it is available in the source document.

  NOTE: Although the program extracts all the metadata in the document, it only displays the first element of metadata.

- Displays a list of the files that are automatically generated during the conversion.

- Specifies the directory in which temporary files created during conversion processes are stored. To specify the temporary directory, remove the comment from the following line in the `XmlConvFileToFile.java` file:

      objXmlExport.setConfigOption(new ConfigOption(Export.CFG_SETTEMPDIRECTORY, 0, "C:\\tmp"));

- Extracts elements from a source XML file based on the extraction settings in the `kvxconfig.ini` file. See Configure Element Extraction for XML Documents.

## Run XmlConvFileToFile on Windows

To run XmlConvFileToFile on Windows

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

   `INSTALL_DIR` | The absolute path of the KeyView 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:

   `XmlConvFileToFile inputfile outputfile`

   where:

   `inputfile` is the path of the source file.

   `outputfile` is the path and file name of the generated XML file.

   To view the XML file in a browser, the `Verity.dtd` and other support files (`.xsl` and `.ent`) must be in the same directory as the XML file. These files are in the `install\javaapi\sample` directory.

## Run XmlConvFileToFile on UNIX

To run XmlConvFileToFile on UNIX

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

   `INSTALL_DIR` | The absolute path of the KeyView 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:

   `./XmlConvFileToFile.csh inputfile outputfile`

   where,

   `inputfile` is the path of the source file.

   `outputfile` is the path and file name of the generated XML file.

Copyright 1997-2023 Open Text
Version 23.4 | Last updated September 2023

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 swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL KeyView 23.4

Topic Title: XmlConvFileToFile