Hi Dmitry, to include binary data in xml:
-it should be base64encoded
-base64Encoded data does not need to be set inside a [CDATA] section -
CDATA -character data- sections are meant to tell the XML parser that
there's no markup to process inside.
-The Xml spec says that Xml nodes wich contains base64encoded values
should indicate it in the xml schema (
https://www.w3.org/TR/xml-media-types/#usage )
so you need to tell VFP to generate the schema to get automatic base64encoding
and proper XML format:
You can test it by embedding any pdf for example:
create cursor test ( bindata m nocptrans )
insert into test ( bindata ) values ( filetostr("somePdf.pdf") )
cursortoxml('test','xx',1,32,0,'1')
strtofile(xx,'temp.xml')
modify file temp.xml
Marco
@nfoxdev
github.com/nfoxdev