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.javafile: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.inifile. See Configure Element Extraction for XML Documents.
Run XmlConvFileToFile on Windows
To run XmlConvFileToFile on Windows
-
In the file
XmlConvFileToFile.bat, set the following variables.INSTALL_DIRThe absolute path of the KeyView Export SDK installation directory. PLATFORMThe platform name. -
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, whereinstallis the Export SDK installation directory.2 The path to the Export SDK bindirectory. -
Run the batch file in the
install\javaapi\sampledirectory. Type the following:XmlConvFileToFile inputfile outputfilewhere:
inputfileis the path of the source file.outputfileis the path and file name of the generated XML file.To view the XML file in a browser, the
Verity.dtdand other support files (.xsland.ent) must be in the same directory as the XML file. These files are in theinstall\javaapi\sampledirectory.
Run XmlConvFileToFile on UNIX
To run XmlConvFileToFile on UNIX
-
In the file
XmlConvFileToFile.csh, set the following variables.INSTALL_DIRThe absolute path of the KeyView Export SDK installation directory. PLATFORMThe platform name. -
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, whereinstallis the Export SDK installation directory.2 The path to the Export SDK bindirectory. -
Run the C shell file in the
install/javaapi/sampledirectory. Type the following:./XmlConvFileToFile.csh inputfile outputfilewhere,
inputfileis the path of the source file.outputfileis the path and file name of the generated XML file.