QuestionQ32

VerifiedTransform and format data with DataWeave

Refer to the exhibit.

Which DataWeave expression converts the sample XML input into the CSV output?

Question Image

Explanation

The multi-value selector .*item returns both sibling item elements for mapping into CSV rows. XML attributes must be selected with .@attributeName, so .@saleId and .@itemId produce the required sale and item values; accessing saleId without @ does not select the XML attribute. DataWeave Selectors

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!