Hello!
Im using the "xsd2Code" for my project on work.
we have a XML with a BillOfMaterial and inside we have '0' or 'many' Artikels.
When i load the XML into my object, the list with "Artikels" is empty.
Does someone know what i need change inside the XLS file to load all Artikels in the list?
(i can not make changes to the structure of the XML).
We have the folowing XML:
<?xml version="1.0" encoding="utf-8"?>
<ns0:MT_BillOfMaterial xmlns:ns0="http://namespace/BillOfMaterial">
The .XLS i created:
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
Im using the "xsd2Code" for my project on work.
we have a XML with a BillOfMaterial and inside we have '0' or 'many' Artikels.
When i load the XML into my object, the list with "Artikels" is empty.
Does someone know what i need change inside the XLS file to load all Artikels in the list?
(i can not make changes to the structure of the XML).
We have the folowing XML:
<?xml version="1.0" encoding="utf-8"?>
<ns0:MT_BillOfMaterial xmlns:ns0="http://namespace/BillOfMaterial">
<BillOfMaterial>
<Indicator>F</Indicator>
<Artikel>2000158</Artikel>
<ReferentieHoeveelheid>96.935</ReferentieHoeveelheid>
<Eenheid>KGM</Eenheid>
<Versie>01</Versie>
<GeldigVan>20150304</GeldigVan>
<Omschrijving>MENG TB BATTER P012</Omschrijving>
<Artikels>
<Indicator>G</Indicator>
<Artikel>2000014</Artikel>
<Hoeveelheid>2.994-</Hoeveelheid>
<Eenheid>KGM</Eenheid>
<Omschrijving>GMP REINIGING BULK</Omschrijving>
</Artikels>
<Artikels>
<Indicator>G</Indicator>
<Artikel>7000000</Artikel>
<Hoeveelheid>0.075-</Hoeveelheid>
<Eenheid>KGM</Eenheid>
<Omschrijving>KUISERIJ test</Omschrijving>
</Artikels>
</BillOfMaterial>
</ns0:MT_BillOfMaterial>The .XLS i created:
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="BillOfMaterial">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="Indicator"/>
<xs:element type="xs:int" name="Artikel"/>
<xs:element type="xs:float" name="ReferentieHoeveelheid"/>
<xs:element type="xs:string" name="Eenheid"/>
<xs:element type="xs:byte" name="Versie"/>
<xs:element type="xs:int" name="GeldigVan"/>
<xs:element type="xs:string" name="Omschrijving"/>
<xs:element name="Artikels" type="ArtikelsCollection" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="ArtikelsCollection">
<xs:sequence>
<xs:element type="xs:string" name="Indicator"/>
<xs:element type="xs:int" name="Artikel"/>
<xs:element type="xs:string" name="Hoeveelheid"/>
<xs:element type="xs:string" name="Eenheid"/>
<xs:element type="xs:string" name="Omschrijving"/>
</xs:sequence>
</xs:complexType>
</xs:schema>