Skip to main content
Question

write away lists in an xml file

  • June 4, 2025
  • 3 replies
  • 57 views

fme_dr22_forum
Contributor
Forum|alt.badge.img+5
Hello fellow FME-ers,I am working on making an xml from an Oracle database (with metadata). I am using the FME template for this in the XML Writer. Using the list builder I have generated two lists. One with the keywords and one with the attribute values. See below as an example (List_Trefwoorden and List_Attribuutinformatie):
How do I make sure these lists (standard FME template for xml) are saved in my XML writer? 
Greetings, Wim

 

3 replies

raghavendrans
Enthusiast
Forum|alt.badge.img+20

@fme_dr22_forum 

When you say that you are using the FME template to populate the XML output, did you mean the XMLTemplater, which can populate an XML document with FME feature attribute values?

If yes, then you can look at this article for assistance:

https://support.safe.com/hc/en-us/articles/25407794770701-XML-Writing-with-XMLTemplater

Happy FME:-) ing

Cheers

SRG


fme_dr22_forum
Contributor
Forum|alt.badge.img+5
Thanks for your answer raghavendrans.No, I didn't use the XML templater. I use the XML Writer.

 

This writer writes the data in xml format (also what I ask for). Only the lists are not included in this xml. I would like to get this done. In addition, I can't get separate xmls. It concerns 1,685 records and I actually want 1,685 separate xmls.


kailinatsafe
Safer
Forum|alt.badge.img+23

Hello ​@fme_dr22_forum, thanks for posting. I’ve attached an example showing how to write an XML document using FME Form. Typically, you’ll need to use XMLTemplater when there’s no XSD available for your dataset.

In the attached workspace, you’ll find two data streams: the first stream templates attributes into XML, and the second stream formats lists in XML.

If you’d like each record to appear as a separate instance in the XML, you’ll need to add a ListExploder to break the list into individual records before writing.

Sometimes its recommended to write XML as Text Line / File data and change the extension to .xml

Hope this helps get you started!