In this example, there is an XML message containing a collection of order items. (This functionality works similarly for all other data formats supported by Smooks.):
<Order>
<header>
<orderId>A188127</orderId>
<username>user1</username>
<name>
<firstname>Bob</firstname>
<lastname>Bobington</lastname>
</name>
<email>bb@awesomemail.com</email>
<state>Queensland</state>
</header>
<order-item>
<quantity>1</quantity>
<productId>364b</productId>
<title>A Great Movie</title>
<price>29.95</price>
</order-item>
<order-item>
<quantity>2</quantity>
<productId>299</productId>
<title>A Terrible Movie</title>
<price>29.95</price>
</order-item>
</Order>
<Order>
<header>
<orderId>A188127</orderId>
<username>user1</username>
<name>
<firstname>Bob</firstname>
<lastname>Bobington</lastname>
</name>
<email>bb@awesomemail.com</email>
<state>Queensland</state>
</header>
<order-item>
<quantity>1</quantity>
<productId>364b</productId>
<title>A Great Movie</title>
<price>29.95</price>
</order-item>
<order-item>
<quantity>2</quantity>
<productId>299</productId>
<title>A Terrible Movie</title>
<price>29.95</price>
</order-item>
</Order>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow