Conversion options are parameters that determine the content, structure, and appearance of the
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 classes:
XmlHeadingInfo
XmlOptionInfo
XmlTemplateInfo
XmlTOCOptionInfo
Use the following classes to set conversion options:
XmlHeadingInfo
XmlOptionInfo
XmlTemplateInfo
XmlTOCOptionInfo
There are methods to get or set the corresponding objects in the XmlExport
instance. In the XmlExport
class, the following methods are available:
getOptionInfo/setOptionInfo
getTemplateInfo/setTemplateInfo
getTOCOptionInfo/setTOCOptionInfo
In the XmlTOCOptionInfo
class, the following methods are available:
getXmlHeadingInfo
setXmlHeadingInfo
.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 fully 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 change shown in bold below:
[KVXMLOptions]
OutputCharSet=KVCS_SJIS
bUseDocumentColors=TRUE
To create valid XML, a template file must contain two sections: KVXMLTemplateEx
and KVXMLOptionsEx.
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 class. In the sample program XmlTest
, a template file is supplied as a command-line argument (see XmlTest). In a Java application, the template file is passed using the setIniFileName
method.
objXmlExport.setIniFileName(iniFile);
The template files for the Java API implementation are in the directory install
\javaapi\ini\html
, where install
is the path name of the Export installation directory.
The following templates are provided for the Java implementation.
|