​I am converting excel to xml using FME 2016 and the XML Templater.

When a field is empty, my xml is invalid because my schema requires

<TAGNAME xsi:nil="true" /> 

but instead gets


which doesn't validate against empty values. Does anyone know how FME can resolve this?


If you were writing with the plain XML writer, had a schema set up with Nillable="True", and had attributes that were 'null' in FME, then you would get that automatically.

Because you're using the XMLTemplater you'll have to delve into XQuery - to be specific our developers told me to use "XQuery quote". You'd need to test if the attribute is empty and write either the value or a fixed string of xsi:nil="true" depending on that test.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.