I would like to generate the complex xml by using JS step. it processed the input from the ktr stream then did some statistical caalculation, then output the XML. for instance the xml output should looks like the below: what is the practical way to do this? can JS step to have a xsd file as well in order to build the structured xml. Thanks in advance.

<pharmacies>
<current products>
<demographic>
<country>
<state>
<county>
</county>
</state)
</country>
</demographic>
</current products>
<historic products>
.......
</historic product>
</pharmacies>