XML Converter Professional Edition
|
XML Converter Professional Edition is the complete solution for the developer who wants the browse facilities provided in the
Standard Edition PLUS special modules, which provide command-line interface. Using the Professional Edition you will
be able to call XML Converter strictly from your own application, with no user interface, allowing you to convert Data Source to
XML in batch mode.
|
|
What the special modules are included in Professional Edition?
|
|
Command-line arguments
XMLConverterCmd can accept quite a few command-line arguments. Many of these arguments can be omitted and XMLConverterCmd can use default
values instead of them. XMLConverterCmd expects command line arguments to be preceded by the "-" (dash) as normally used by DOS
programs. Also you can use a special configuration file default.cfg for defining and sending your parameters to XMLConverterCmd.exe.
If you define arguments in command-line then their values will have a high priority than the values have been defined in default.cfg.
There is a description of some XML Converter command-line arguments:
SourceFileName
A Name of Data Source file with full path like:
C:/MyDirectory/MyBook.xls
SourceTableName/or Number
A Name or a number of spreadsheet or table, which belongs to your Data Source file.
Default is empty string
If you decide to define the [SourceTableName/or Number] argument as a number
of table/spreadsheet you have to put this parameter after [SourceFileName] arguments.
Otherwise, if [SourceTableName/or Number] argument is name of table/spreadsheet
and contents spaces inside you must enclose it in "[ ]" brackets:
XMLConverterCmd.exe -rXLS -sC:\MyDir\MyBook.xls -n[First sheet 10] ...
Also you can leave this argument empty. It means XML Converter will generate one common xml
output file where data from all of your Data Source's spreadsheets/tables will be stored.
In this case you can create your own XML database. This software gives you ability to generate an output as a set of XML tables.
MappingMethod
The Mapping method determines how each Source data column is mapped when a XML document is saved.
This argument should be omitted when TargetTypeName is not xml.
Values:
e - Map out as Element
a - Map out as Attribute
r - Map out as Row Content?? ?? ?? ?? ?? ?? ?? ?? ??Default is e
NeedXSLtemplate
Argument is replying to question: "Would you like to accompany your XML document
with a template XSL style-sheet?" This argument should be omitted when TargetTypeName is not xml.
Values:
yes
no?? ?? ?? ?? ?? ?? ?? ?? ??Default is no
ShowRegForm
If you are not a registered user of the XML Converter with command-line interface yet you can order the software online.
After that we will send to you your secure installation code and you will run your software with the parameter:
XMLConverterCmd.exe -r
A special registration form will appear where you will be able to legalize your Converter.
Example
If you want to get one XML file generated from all of ?MyBook.xls? spreadsheets you
can use the signature:
XMLConverterCmd.exe -sC:\MyDir\MyBook.xls ?n
For this case final ?MyBook.xml? file will be saved in directory ?C:\MyDir\? and will
content data from all spreadsheets. Also, this file will have special tags, such as
"workbook", "worksheet", "row", "field column=""", which allow you to directly access
and read the XML file by using DOM or SAX software.
The XMLConverterCmd.exe returns error codes:
0 - Ok
1 - Syntax error in command line
2 - Source file does not exist
3 - Source table does not exist
4 - Can't open source file
5 - Can't create XML file
6 - Error of XSL-template creating
7 - Can't create XSD file
8 - Error of DTD creating
9 - Can't connect to data
10 - Can't read data format
11 - Error of TrasX-Schema creating
12 - Error in "micro" - module
13 - Target file is not created
Example
If you want to get one XML file generated from all of "MyBook.xls"
spreadsheets you can use the signature:
XMLConverterCmd.exe -sC:\\MyDir\\MyBook.xls ?n
For this case final "MyBook.xml" file will be saved in directory
"C:\MyDir\" and will content data from all spreadsheets. Also, this
file will have special tags, such as "workbook", "worksheet", "row", "field
column=""", which allow you to directly access and read the XML file by using
DOM or SAX software.
Also XMLConverterCmd supports ErrorLevel DOS variable. When using a dos batch file to execute XMLConverterCmd.exe, how do you go about error handling? There is the ErrorLevel variable being passed back to the batch file that can be interrogated to determine successful/unsuccessful completion of XML Converter Cmd. To try the functionality you should have a .bat file like the following:
@Echo Off
XMLConverterCmd.exe
goto %errorlevel%
:0
echo Ok
goto end
:1
echo Syntax error in command line
goto end
:2
echo Source file does not exist
goto end
:end
XMLConverterCMD.err file
When XMLConverterCmd.exe interrupts its execution the special file XMLConverterCmd.err will be created where error reports are stored. This error message file contains both error numbers and their associated text messages. The error report is accompanied by the date and time when it occurred. Since the error message file created with XMLConverterCmd is a binary text file it can be accessed by any text editor.
|
|
|