There isn't a away to disable this using the XML text outputter that is
the default with the CLI. There have been requests in the past to change
how we output XML (e.g. preserving newlines) so not escaping these might
be something to consider.
However, one option would be to use a different InfosetOutputter that
doesn't do escaping. The Scala infoset outputter does also escape quotes
by default when printed, but it looks like JDOM and w3cdom do not. So
using the CLI, you could use -I jdom or -I w3cdom and you'll get a
slightly different output that doesn't escape quotes.
- Steve
On 11/11/19 3:31 PM, Costello, Roger L. wrote:
> 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:defineEscapeSchemename='Quotes'>
> <dfdl:escapeSchemeescapeKind='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 "Great car"to the dealer</field>
> <field>40000.00</field>
> </record>
>
> Notice that the double-quote is encoded as "
>
> I don’t want it encoded. How do I get that escape character resolved in the
> XML
> output?
>
> /Roger
>