I need to create an XML file from an XSD file via a class. I'm new to programming so I followed this tutorial to make my first test XML and it worked out fine: Generating XML file using XSD file
But now i gotta do it with a bigger XSD, creating a bigger XML looking like this:
<?xml version="1.0" encoding="UTF-8"?>
<test-xml xsi:noNamespaceSchemaLocation="test.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Mod0>
<K0_1 KnZ="0.1">Input1</K0_1>
<K0_2 KnZ="0.2">Input2</K0_2>
<K0_3 KnZ="0.3">Input3</K0_3>
</Mod0>
<Mod1>
<K1_1 KnZ="1.1">Input1</K1_3>
<K1_2 KnZ="1.2">Input2</K1_4>
<K1_3 KnZ="1.3">Input3</K1_4>
</Mod1>
</test-xml>
My Problem is, that the tutorial doesn't create an XML File looking like this.
It would only use
<test-xml>
and<Mod0>
as elements, without<K0_1>
up to<K0_3>
but i need all of these elementsAlso it would just stop at
<Mod0>
, but I need<Mod0>
up to<Mod18>
And at last, I didn't get
KnZ="0.1"
etc. before the Input like in my example code
I created the class using the xsd.exe tool based of my XML schema just like in the tutorial in step 1 but now I don't know how to code so that my XML looks like I showed in the example code above.
Can anyone help me with that? I would very much appreciate it.
Thanks in Advance