A simple console application that converts a XML file to binary.
A simple console program written in .NET Core that verifies an XML file against an XSD schema.
If verification succeeds, the XML file is binarized and a header file for C/C++ embedded software is created from the XSD schema. This header file is useed to access data from the binary file.
The program can be used in different modes, listed below - check them to find out more.
This version of the program can be used in 3 modes.
First Method - Q/A MODE.
The console can be launched without any parameters. When launched in this mode, the user must insert all data in the console, step by step, accordinq to the console questions (Q/A).
If all data is inserted correctly, the result (binary and header file) will be saved in C:\Users\[username]\Documents\XmlBinaryConverter
.
Second Method - Background MODE.
The programm can be launched in background using some parameters. When used in this mode, the console must be launched with the mandatory parameters.
If all mandatory parameters are seated correctly, the result will be saved in the C:\Users\[username]\Documents\XmlBinaryConverter
folder,
or in the selected folder defined with -o
parameter.
Parameter | Description | Type |
---|---|---|
-help | Show help option | Optional |
-xsd | Location of XSD file | Mandatory |
-xml | Location of XML file | Mandatory |
-xns | Namespace URI: (Ex. http://tempuri.org/Test.xsd) | Mandatory |
-xpx | XML namespace prefix | Mandatory |
-xen | XML main element name | Mandatory |
-o | Location of output files | Optional |
-it | Interactive Mode | Optional |
Third Method - Interactive MODE.
The console can be started in interactive mode using -it
parameter. When launched in this mode, the console will start in Background Mode by searching
for all mandatory parameters; if any of these parameters are not set, the console will switch to Q/A Mode and ask the user to insert the missing data.
The result will be saved in C:\Users\[username]\Documents\XmlBinaryConverter
, or in the defined folder if -o
parameter was inserted.