Esko Logo Back to Esko Support
Choose your language for a machine translation:
Skip to end of metadata
Go to start of metadata

 

Summary

If I use the Map Data task to convert an XML file to a CSV file and there are empty values in the XML, no output is written.

Symptoms

  • XML input file has empty elements.
  • No output CSV file is written.
  • There is an invalid reference error in the log file of the task.

Solution

For example:
Consider this as the XML
<element1>text1</element1> 
<element2></element2> 
<element3>text3</element3> 

It should result in this CSV

text1,,text3 

The XPath query for element2 can be written as follows:

 string(/xml/element2/text())rather than /xml/element2/text()

This will convert the empty value to a string, which is allowed to run this task.

Article information
Applies to

Automation Engine 14.x and newer

Created15-Nov-16
Last revised 
AuthorLEFR
Case Number00688743
Contents

 

1 Comment

  1. Hi Leander,

    It works perfectly fine but not repeated content, do you have an idea?

    Many thanks

    Conrad, Benjamin