Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to generate XML containing siblings of the group element

I want to generate the following xml using tWriteXMLField.

 

 

<SetDocument>
<Key>pass123</Key>
<CostCenterID>41004</CostCenterID>
<Owner>Admin</Owner>
<Header>
<DocPrefix></DocPrefix>
<DocNo></DocNo>
<CustomerName>
<Code>4102</Code>
<Name></Name>
</CustomerName>
<VehicleNo>
<Code>2</Code>
<Name></Name>
</VehicleNo>
<Branch>
<Code>11</Code>
<Name></Name>
</Branch>
</Header>
<Body>
<Row>
<ProductCode>
<Code>D05</Code>
<Name></Name>
</ProductCode>
<Qty>1</Qty>
<Units>
<Code>Kg</Code>
<Name></Name>
</Units>
<UnitPrice>1</UnitPrice>
<RefNO>9393</RefNO>
</Row>
<Row>
<ProductCode>
<Code>D06</Code>
<Name></Name>
</ProductCode>
<Qty>1</Qty>
<Units>
<Code>Kg</Code>
<Name></Name>
</Units>
<UnitPrice>1</UnitPrice>
<RefNO>9394</RefNO>
</Row>
</Body>
</SetDocument>

/Body/Row is the loop element. <SetDocument> is the root element and for this to work, should be the group element as well but I learned I cannot mark the root element as group element.

 

I am willing to try another component. How can I get this working. I am using Talend Open Studio. 

 

Labels (3)
1 Reply
Anonymous
Not applicable
Author

Hello,

What does your input source data look like?

Best regards

Sabrina