Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XMLTOCURSOR() with invalid characters
Message
De
26/07/2016 23:25:08
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01638686
Message ID:
01638708
Vues:
101
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform