Hi @boubcher
Could you share us again the images? These files are broken.
Thanks,
Danilo
It would be better if you would copy and paste the template expressions as-is here, rather than images. Also, please post the error messages logged when you run the workspace.
@takashi
@danilo_fme
Thanks for your response
attached the excel file for the data we want to convert to XML
and the output we are looking for is
<group>
<Section>#LayerName#</Section>
<Lay erID>#LayerID#</LayerID>
<Grid GridID="Grid2555550" Color="#Color#" FilterFeild="" FilterValue="*" BufferLayer=""
<Column dataField="#id#" dataType="" summaryType="#sum#"></Column>
</Grid>
</group>
we want to replace the layer name with the value of the attribute ( fme_feature_type_name)
and the id with the value in the attribute (name )
wml templater.xlsx
@takashi
Hello Takashi I did add more information to our case any suggestion
Thanks
Have a look at the attached workspace template, hopefully I've understood your requirements.
xmltemplater.fmwt
When there's only a single input source to the XMLTemplater, you can use the Sampler and DuplicateFilter to preprocess the input according to key attributes.
Have a look at the attached workspace template, hopefully I've understood your requirements.
xmltemplater.fmwt
When there's only a single input source to the XMLTemplater, you can use the Sampler and DuplicateFilter to preprocess the input according to key attributes.
@david_r
Thanks for your response
I am not able to download the WS the ulr is giving this error (
HTTP Status 403 -
@david_r
Thanks for your response
I am not able to download the WS the ulr is giving this error (
HTTP Status 403 -
Looks like it's the forum that's bugging.
Try this link: https://www.dropbox.com/s/g3yr27d7wpbtknu/xmltemplater.fmwt?dl=1
Have a look at the attached workspace template, hopefully I've understood your requirements.
xmltemplater.fmwt
When there's only a single input source to the XMLTemplater, you can use the Sampler and DuplicateFilter to preprocess the input according to key attributes.
@david_r
Thanks so much for the answer this what I was looking for
the mistake I was doing is on this
{fme:process-features("COLUMNS", "fme_feature_type_name", fme:get-attribute("fme_feature_type_name"))}
{fme:process-features("COLUMNS", fme:get-attribute("fme_feature_type_name"))}
could you please explain why should we both "fme_feature_type_name", fme:get-attribute("fme_feature_type_name")
the logic is get the columns from features type name ,
@david_r
Thanks so much for the answer this what I was looking for
the mistake I was doing is on this
{fme:process-features("COLUMNS", "fme_feature_type_name", fme:get-attribute("fme_feature_type_name"))}
{fme:process-features("COLUMNS", fme:get-attribute("fme_feature_type_name"))}
could you please explain why should we both "fme_feature_type_name", fme:get-attribute("fme_feature_type_name")
the logic is get the columns from features type name ,
The function call with this syntax executes the sub template expression for every feature (entered into the sub port) which has the specified value in the attribute. That is, it works like the Group By.
fme:process-features( <template names>, <attributes to filter>, <filter values> )
See also here to learn more: XQuery Functions
@david_r
Thanks so much for the answer this what I was looking for
the mistake I was doing is on this
{fme:process-features("COLUMNS", "fme_feature_type_name", fme:get-attribute("fme_feature_type_name"))}
{fme:process-features("COLUMNS", fme:get-attribute("fme_feature_type_name"))}
could you please explain why should we both "fme_feature_type_name", fme:get-attribute("fme_feature_type_name")
the logic is get the columns from features type name ,
In addition to what Takashi says, have a good look at the examples in the XMLTemplater help, it's pretty well documented.