Hi Folks,

In the CSV file format, a field may be enclosed within double-quotes (" ... ").

If you want a double-quote within it, you must precede it by a double quote, 
e.g.,

"He said ""Great car"" to the dealer"

I expressed all that within a dfdl:escapeScheme element:

<dfdl:defineEscapeScheme name='Quotes'>
    <dfdl:escapeScheme escapeKind='escapeBlock'
        escapeBlockStart='"'
        escapeBlockEnd='"'
        escapeEscapeCharacter='"'
        extraEscapedCharacters=''
        generateEscapeBlock='whenNeeded'/>
</dfdl:defineEscapeScheme>

With this input:

2019,Toyota,Avalon,"He said ""Great car"" to the dealer",40000.00

I get this XML output:


  <record>
    <field>2019</field>
    <field>Toyota</field>
    <field>Avalon</field>
    <field>He said &quot;Great car&quot; to the dealer</field>
    <field>40000.00</field>
  </record>

Notice that the double-quote is encoded as &quot;

I don't want it encoded. How do I get that escape character resolved in the XML 
output?

/Roger

Reply via email to