> > "wrap memo data in CDATA sections"
> What is the advantage of that flag?
Hi
This flag wraps memo fields so they are interprested by the XML parser as text and not as markup (XML). This saves having to encode characters like & and < and >.
However, if you have a rogue character - e.g. chr(5) - in the memo, then XML to cursor will error regardless of CDATA, and you will have to pre-parse these characters out before calling XMLToCursor
clear
create cursor foo (bar m)
insert into foo values (chr(5))
? "Without CDATA"
? "-----------------------"
cursortoxml(alias(), "cXML", 1)
? cXML
? "With CDATA"
? "-----------------------"
cursortoxml(alias(), "cXML", 1, 8)
? cXML
* Errors whichever way
xmltocursor(cXML)