Consultor Eletrônico



Kbase P114125: Can the XML parser read files where a CDATA node has embedded carriage returns and line feeds?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/25/2008
Status: Verified

GOAL:

Can the XML parser read files where a CDATA node has embedded carriage returns and line feeds?

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.x

FIX:

No, the XML parser cannot read files where a CDATA node has embedded carriage returns and line feeds because these characters are not valid within an XML document. Consequently, the XML parser fails to validate a document formatted in this way when the LOAD method is invoked.

The proper way to send such data is to encode the data using base64 encoding before inserting it into the CDATA node. Doing base64 encoding ensures that there are no characters which cannot be used in an XML document. Once the base64 data has been extracted the BASE64-DECODE function can be used to return the data back into its original format.