The XPATH attribute is used when reading and writing files to indicate the XML markup.
We currently support the expression XPATH('<>') to allow the programmer to say that the string is to be left "as is" so that it can include embedded XML.
For example, consider the definition:
EXPORT AbstractXML := RECORD,MAXLENGTH(100000)
When this definition is used with a DATASET(...,XML) function, the abstract field can have embedded XML for subsequent parsing.
This should work for output as well.
The instant case that motivates this request is a SOAPCALL where the contents of an attribute were expected to contain a CDATA. For example:
<b type="New""><![CDATA[ Lord & Taylor ]]> </b>
A note from Tony says "You could argue xpath(‘<>’), which when reading xml means “read all child content as an xml string”, should mean “do not escape xml output” when writing. It would then be symmetrical for read and write. But I don’t think that works currently. You could open an issue to support that… if so you should probably mention SOAPCALL explicitly."