MCD-LEVEL-1 · Question #95
What DataWeave expression transforms the example XML input to the CSV output? A) B) C) D)
The correct answer is A. Option A. Correct answer is as below. Attributes in the incoming xml payload are always accessed using @.Similarly item is required as we have multiple items in the request output application/csv payload.sale.item map ((value, index) -> { sale: value.@saleId, itemName: value.desc…
Question
What DataWeave expression transforms the example XML input to the CSV output? A) B) C) D)
Exhibit
Options
- AOption A
- BOption B
- COption C
- DOption D
How the community answered
(51 responses)- A71% (36)
- B4% (2)
- C18% (9)
- D8% (4)
Explanation
Correct answer is as below. Attributes in the incoming xml payload are always accessed using @.Similarly *item is required as we have multiple items in the request output application/csv payload.sale.*item map ((value, index) -> { sale: value.@saleId, itemName: value.desc, itemPrice: (value.quantity) * (value.price), item: value.@itemId
Topics
Community Discussion
No community discussion yet for this question.
