Skip to main content
Question

Dealing with nullable attributes in XmlTemplater

  • March 24, 2023
  • 2 replies
  • 32 views

fme_hans
Contributor
Forum|alt.badge.img+5

Hi,

 

I am building an xml file with the XMLTemplate. Empty fields are displayed differently than expected. <attribute></attribute> is displayed (exported) as <attribute/>

By first changing empty fields to <attribute>Replace this text with nothing</attribute> and then replace the text 'Replace this text with nothing' with null using the string concatenator, it works. But I'd rather be able to properly set the empty fields in the XMLTemplate. How can this be done?

 

 

2 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • March 24, 2023

Null or empty?


fme_hans
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • 44 replies
  • March 24, 2023

When the fields are empty i get this <attribute/> and i need this: <attribute></attribute>