Don't you need to use strconv() to convert the binary data into text, and back?
>Make sure that field with JPG is either Memo(binary) or Blob.
>
>>
>>I have a cursor with a memo field that stores a JPG file.
>>When I do
>>
>>CURSORTOXML(ALIAS(),"test.xml",1,8+512)
>>
>>Then the next line causes an error:
>>
>>XMLTOCURSOR("test.xml","testme",512)
>>
>>Message: "An invalid character was found in text content"
>>
>>So far no luch playing around with the Flags parameter. Any ideas?