What is the best approach to create an output XML with 1 order with its order items as child nodes. The source is Salesforce. I am using the latest version of Scribe insight. Should the order items be chosen as the primary object?

This should give you an idea of what I am trying to achieve:

 <xs:element name="order">

   <xs:complexType>

     <xs:sequence>

       <xs:element type="xs:dateTime" name="OrderConfirmationDate"/>

       <xs:element type="xs:string" name="AccountNumber"/>

       <xs:element type="xs:string" name="OrderNumber"/>

       <xs:element type="xs:dateTime" name="DeliveryDate"/>

       <xs:element type="xs:dateTime" name="LASTMODIFIEDON"/>

       <xs:element type="orderitems" name="orderitems"/>

     </xs:sequence>

   </xs:complexType>

 </xs:element>

 <xs:complexType name="orderitems">

   <xs:sequence>

     <xs:element name="orderitem" minOccurs="1" maxOccurs="unbounded">

       <xs:complexType>

         <xs:sequence>

           <xs:element type="xs:string" name="ProductCode"/>

           <xs:element type="xs:decimal" name="Quantity"/>

         </xs:sequence>

       </xs:complexType>

     </xs:element>

   </xs:sequence>

 </xs:complexType>

</xs:schema>

(1) Answer

Login