Firstly, you are using xml node attributes to specify the field options. Instead, the options should be defined like this:
<Field Name=""MyField"" Type=""String"">
<TrimMode>Both</TrimMode>
</Field>
Secondly, the TrimChars
attribute will not work when it's the same as the field delimiter. Instead you should add an additional dummy optional final field. Like this:
<Fields>
<Field Name=""MyField"" Type=""String"">
<TrimMode>Both</TrimMode>
</Field>
<Field Name=""IgnoreTrailingDelimiter"" Type=""String"">
<FieldOptional />
</Field>
</Fields>