Exam MCD - Level 1 All QuestionsBrowse all questions from this exam
Question 113

Refer to the exhibit.

What DataWeave expression transforms the example XML input to the CSV output?

A.

B.

C.

D.

    Correct Answer:

    The correct DataWeave expression to transform the given XML input to the CSV output is option A. Here's the explanation: To access XML attributes in DataWeave, you need to use the '@' symbol. In the provided DataWeave expression (option A), the saleId and itemId are correctly accessed using value.@saleId and value.@itemId. Additionally, to transform the collection of items, the correct XPath selector is used, which is *item. Other options either do not use the '@' symbol or do not use the correct collection selector. Therefore, option A is the correct answer as it accurately processes XML attributes and the collection structure.

Discussion
nilan84

A is corect

Anseal

A is correct: collection of items (*items), as well as XML param: @param.

miguel_romero

A is correct

chengl

B is correct.

chengl

Correction, A is correct, xml attribute is accessed with @.

ExamDev

A is correct, xml attribute is accessed with @.

Maxroyo

A is correct