Skip to main content

Hi FME ninjas,

I'm struggling trying to transform XML data to tabular data.

 

Attached is an example XML. I'm looking at records that have multiple opening hours per day of the week. (in the example dayNumber="2" is Monday)

Opening and closing time are in "timeBegin" / "timeEnd"

 

I'm trying to aggregate / merge these into one row.

What I'd like to have:

stationCode Monday1_open Monday1_close Monday2_open Monday2_close RNSC01 0700 1200 1400 1800

Thanks,

 

Ed

Hi @edhere, if I have understood the requirement correctly, this workflow might help you.

rename-and-aggregate.fmwt (FME 2018.1.0.3)


Hi @edhere, if I have understood the requirement correctly, this workflow might help you.

rename-and-aggregate.fmwt (FME 2018.1.0.3)

@takashi

 

 

There is one more problem I'm facing: the early / late hours seem to be mixed up.

 

In above example the late hours end up in the first _1 group, the early hours are in the _2 group.

 

Is there a way to sort them so the early hours always end up in the _1 group?

 

 

Thanks,

 

Ed

 

 


@takashi

 

 

There is one more problem I'm facing: the early / late hours seem to be mixed up.

 

In above example the late hours end up in the first _1 group, the early hours are in the _2 group.

 

Is there a way to sort them so the early hours always end up in the _1 group?

 

 

Thanks,

 

Ed

 

 

Try sorting the features by "station.timeBegin" ascending, before the Counter.
Try sorting the features by "station.timeBegin" ascending, before the Counter.
That worked, thank you!