I want to read CSV entries with a Smooks CSV reader. But my problem is how to define a field as optional.
<?xml version="1.0"?>
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
<csv:reader fields="field1,field2,OPTONAL_FIELD3,$ignore$+" />
</smooks-resource-list>
Is there any way to define such a configuration?
The data I want to read looks like this:
123,4,opt1
456,7
If field 3 is declared as normal in the configuration, the line must always ends with a ',' like this:
456,7,