Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XML truncating long memo fields
Message
De
11/01/2002 17:11:05
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00603647
Message ID:
00603787
Vues:
17
Hi Cathy,

Thanks for your help. I tried a different table and a different text string. This time, it read in the entire text string but my server generated an error message, XML Parse Error - Invalid character found int text.

I went through both memo fields and found that in the case of the first memo field, an equal sign, =, caused the XML stream to be truncated. In the second memo field, there were no equal signs and the entire XML stream was sent to my Com Server, but when the XMLTOCURSOR tried to process the XML stream, it didn't like the percent sign, %.

So, with your help, I figured out what was causing the problem. Now, I guess I need to weed out the =, %, and other characters yet to be determined from my memo fields. Or, encode these characters. Maybe, if in the client code, I convert all characters that are not in the a..z,A..Z,0..9 sets with '[CODE'+ASC(lcChar)+']' such that a charater string of "x=y" gets encoded to "x[CODE61]y", assuming that brackets, [ and ], are legal ;) And then, of course, on the server side, decode them accordingly.

Unless you or someone else has a better idea(?) Obviously can't use URLENCODE since percents signs are used all over the place.

Thanks,
Alan

>Alan,
>
>A couple of things to try or check out ...
>
>- Are you using CURSORTOXML to send the XML to a string or a file? If doing a string, try a file to see if this solves the problem. If not, try messing around with the STRCONV() function to manipulate the string.
>
>- Is the "731" magic number specific to that one memo field? Try a different memo field to see if it stops at 731. Also try changing other fields in the table so the memo field isn't positioned in the exact same position. IOW, is it the specific content of that memo field or is it ALWAYS 731 characters into ANY memo field.
>
>Cathy
>
>>Cathy,
>>I tried this, but it still truncated the entire XML stream after 731 characters into the memo field. I saw that the memo field now starts with [!CDATA[
>>
>>Not only does the XML stream only have the first 731 characters of the memo field, but also the XML stream completely stops - there is nothing after the truncated memo field - not even ending tags.
>>
>>
>>Thanks,
>>Alan
>>
>>>>I have a front end VFP application that uses several WININET functions, including InternetReadFile, send and receives XML streams to a Foxisapi instantiated COM object on a web server. The application works great - except when the XML stream includes a lot of text from the contents of a VFP table's memo field (text in a memo field is okay if its not too long). The XML is apparently truncated in the middle of the memo field's text - looks like it truncates after 731 characters. I'm not sure if the truncating is occuring on the client side within the WININET functions that send the stream, or if its occuring on the server side within Foxisapi or my Com Server.
>>>>
>>>>Has anyone else experienced this behavior?
>>>>TIA,
>>>>Alan
>>>
>>>Make sure you are using the flag that wraps Memo fields with CDATA sections when you create the XML from the Fox cursor (I think it's 8).
>>>
>>>Cathy
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform