# Set Conversion Options

Conversion options are parameters that determine the content, structure, and appearance of the XML output. For example, you can specify:

- the markup inserted at the beginning and end of specific XML blocks
- whether a heading is included in the table of contents
- the output character set
- the resolution at which graphics are converted.

You can set the conversion options either in the API or in the template files. Regardless of the method used to set the options, the values are ultimately passed to the API and used to populate the following data structures:

- KVXMLTemplate

- KVXMLOptions

- KVXMLHeadingInfo

- KVXMLTOCOptions

The conversion options are described in XML Export API Structures.

## Set Conversion Options by Using the API

Use the following functions to set conversion options:

- fpConvertStream()

- KVXMLConvertFile()

- KVXMLStartOOPSession()

## Set Conversion Options by Using the Template Files

XML Export includes templates in the form of initialization files (`.ini`). The templates provide a quick and easy way to modify the conversion options without programming at the API level. However, the template files do not give you complete control of the conversion process. To control some features, you must use the API directly.

You can use a text editor to customize the template files. For example, to change the output character set from the default `KVCS_UNKNOWN` to `KVCS_SJIS` in the `default.ini` template, make the following change shown in bold:

    [KVXMLOptions]
    eOutputCharSet=KVCS_SJIS
    bForceOutputCharSet=TRUE

To create valid XML, a template file must define at least two structures: `KVXMLTemplateEx` and `KVXMLOptionsEx`.

NOTE: If you enter markup in the template files that is not compliant with XML standards, XML Export inserts the markup into the output file unchanged. This might result in a malformed XML file.

An application must then read the template file and write the data to the appropriate Export structures. In the sample program `xmlini`, a template file is supplied as a command-line argument (see xmlini).

### Templates

The template files for the C API implementation are in the directory `install\xmlexport\programs\ini`, where `install` is the path name of the Export installation directory. The following templates are provided:

Template | Description
--- | ---
Cascading style sheet (`xml_css.ini`) | This template writes style sheet information to an external CSS file. This makes the XML output significantly smaller because the information is not stored in the output file. See Use Style Sheets and Use Style Sheets with xmlini for more information on using an external CSS file.
Index (`xml_index.ini`) | Converts a source document into a single, largely unformatted XML file that is appropriate for use with an indexing engine.
Single file( `xml1file.ini`) | Creates a single XML file. Does not define an XSL style sheet. A default XSL style sheet that is appropriate to the source document type is used. The defaults supplied are `wp.xsl` (for word processing documents), `ss.xsl` (for spreadsheets), `pg.xsl` (for presentations). Forces the output character set to UTF-8. Maintains the source document's fonts and styles. Does not create a table of contents.
Single file for presentations (`xml1file_pg.ini`) | This template is designed specifically for presentation formats. Creates a single XML file. Defines an XSL style sheet for presentations (`pg.xsl`). Forces the output character set to UTF-8. Because XML Export only extracts textual components from presentations, the `bRasterizeFiles` member of `KVXMLOptions` is set to `FALSE`. KVXMLOptions. Only the `szMainTop`, `szMainBottom`, and `szUserSummary` parameters of the `KVXMLTemplate` structure are relevant to presentations and are set in the presentations template. A template file for presentations must not include any other parameters in the `KVXMLTemplate` structure. KVXMLTemplate.
Single file with table of contents (`xml1filetoc.ini`) | Creates a single XML file. Creates a table of contents at the top of the XML document. Uses the `Verity.dtd`. Uses an XSL style sheet (`wp.xsl`). Forces the output character set to UTF-8. Lists all metadata (Title, Subject, Author, Comments, Created, Modified, Last Saved By, and Revision Number). Uses the name of the worksheets for spreadsheets. Uses the slide titles for presentations. If no titles are available in the source document, it uses "slide 1," "slide 2," "slide 3," and so on.

© Copyright 2006-2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm