From ff7890924eb0cca58139ece8c4fbf76de2072f95 Mon Sep 17 00:00:00 2001 From: Michael Ganss Date: Tue, 21 Jun 2022 18:05:38 +0200 Subject: [PATCH] Explain namespace mapping file option --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index a41cec55..0129ed1d 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,13 @@ Options: xsd) to the XML namespace. If no mapping is found for an XML namespace, a name is generated automatically (may fail). + --nf, --namespaceFile=VALUE + file containing mapppings from XML namespaces to C# + namespaces + The line format is one mapping per line: XML + namespace = C# namespace [optional file name]. + Lines starting with # and empty lines are + ignored. -o, --output=FOLDER the FOLDER to write the resulting .cs files to -i, --integer=TYPE map xs:integer and derived types to TYPE instead of automatic approximation @@ -208,6 +215,20 @@ xscgen -n =Example example.xsd Note the space between `-n` and `=Example`. +#### Using mapping files + +Instead of specifying the namespace mappings on the command line you can also use a mapping file which should contain one mapping per line in the following format: + +``` +# Comment + +http://example.com = Example.NamespaceA a.xsd +http://example.com = Example.NamespaceB b.xsd += Empty +``` + +Use the `--nf` option to specify the mapping file. + Nullables ---------------------------------