QuestionQ49

VerifiedDeveloping Mule Applications

Refer to the exhibit.

Which DataWeave expression transforms the conductorIds array into the XML output?

Question Image

Explanation

XML collections are represented in DataWeave as repeated keys. Mapping each conductorIds value to { train: { engineerId: engId } } produces repeated train elements, and wrapping that mapped sequence inside the trains object produces a single <trains> root containing those children. MuleSoft’s XML documentation demonstrates injecting a collection into an XML root object with parentheses.

Learn more

Community Discussion

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