Skip to main content

Hi,

I am quite new to XML and I would like to generate xml structured file using FME.

For input I have a simple csv file with 3 columns:LOCALITATE (tanslation: Locality), STRADA (translation: Street) and NR (Translation: Number).

Desired structure should be something like:

<localitati>

<localitate>Buftea</localitate>

<strada>Parului</strada>

<nr>1</nr>

<nr>2</nr>

<nr>3</nr>

<strada>Independentei</strada>

<nr>4</nr>

<nr>5</nr>

<nr>6</nr>

......

<localitate>Mogosoaia</localitate>

<strada>Printipala</strada>

<nr>11</nr>

<nr>12</nr>

<nr>13</nr>

</localitati>

 

I used FME to read my CSV, added an XMLTemplater to obtain my desired xml.

After I properly(maybe?) set all parameters, it doesn't seem to group NR by STREET. Instead, it is placing all numbers for each street in each Locality.

 

I attached workspace + input and output data.

Can you give me some help in telling me where I am making the mistake?

 

Thank you!

nicu

 

 

 

I think what you are looking for is the SUB-template, combined with the "group sub features by" setting.

Maybe you need to do this for every layer of data. So two xmltemplaters: one for the 'street' and one for the 'locality'. But I did not look at your workbench or data. So maybe I'm wrong.XML Sub Templater 

 

I hope the image above will give you a clue to figure it out?


Reply