Export to XML multiple lines

0
Hi, Currently trying to do a Domain-to-XML mapping with the following xsd mapping: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeformdefault="unqualified" elementformdefault="qualified"> <xs:element name="ProductionLines"> <xs:complexType> <xs:sequence> <xs:element type="xs:string" name="No"/> <xs:element type="xs:string" name="Lineno"/> <xs:element type="xs:string" name="DueDate"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> This should export a domain model with multiple entries do an XML as above, however when i add 'Export XML Document' to my microflow i can't seem to add a list as my parameter, only a single object, how should I go about this?
asked
3 answers
0

Hi Niels,

Add maxOccurs="unbounded" to the ProductionLines tag. For example: xs:element name="ProductionLines" maxOccurs="unbounded" minOccurs="1"

This will make the 1...N relation when you re-import the XSD.

answered
0

Here is an example XSD:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    <xs:element name="Production">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="ProductionLines" maxOccurs="unbounded" minOccurs="1">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element type="xs:string" name="No"/>
                            <xs:element type="xs:string" name="Lineno"/>
                            <xs:element type="xs:string" name="DueDate"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
answered
0

Try to remove both the attributeformdefault="unqualified" elementformdefault="qualified" attributes, like this:

<?xml version="1.0"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >

    <xs:element name="ProductionLines">
      <xs:complexType>
        <xs:sequence>
          <xs:element type="xs:string" name="No"/>
          <xs:element type="xs:string" name="Lineno"/>
          <xs:element type="xs:string" name="DueDate"/>
        </xs:sequence>
      </xs:complexType>
    </xs:element>

</xs:schema>
answered