Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Chr(13) / chr(10) in memo fields
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00895846
Message ID:
00895916
Views:
17
Your English is fine Martin.

I know I can generate the XML that way. But I am trying to build a generic class that serializes and converts back to cursor the data in my tables.

My application has over 3000 Tables. I can't produce manually the XML and parse it back for all the data type and tables I have. So this class (xmladapter) works fine.

What I will do is hardcode in my class a strtran to convert the chr(10) to chr(13) in this specific field of this specific table.

Thanks for you help Martin.

>Hi Francisco,
>
>I'm sorry for bad my English...
>You can generete XML from VFP directly with TEXT/ENDTEXT or FPUTS()/FWRITE() or STRTOFILE() and You encode MEMO to base64 s STRCONV() function.
>
>XML is ONLY text file...
>
>...from help TEXT...ENDTEXT coomand
>
>PROCEDURE myProcedure
>   DO CASE
>   CASE nValue = 1
>      TEXT TO myVar NOSHOW TEXT PRETEXT 7
>         <?xml version="1.0" encoding="utf-8"?>
>         <DataSet xmlns="http://tempuri.org">
>         <<ALLTRIM(STRCONV(leRetVal.item(0).xml,9))>>
>         </DataSet>
>      ENDTEXT
>   OTHERWISE
>   ENDCASE
>ENDPROC
>
>
>
>
>MartinJ
>
>>Thank you Martin,
>>
>>I understand what you said about the bug in xmldom.
>>My memos are not binary.
>>What exactly do you mean with «you can generate XML programmaticaly» ?
>>
>>
>>
>>>Hi Francisco,
>>>
>>>It's bug in XMLDOM on reading XML.
>>>XML DOM convert CHR(13) to CHR(10) and CHR(13)+CHR(10) to CHR(10).
>>>If memo is binnary, you can convert it to BASE64.
>>>If you have not binnary memos, you can generate XML programmaticaly.
>>>
>>>MartinJ
>>>
>>>>I'm having this problem:
>>>>
>>>>I have a cursor with a Memofield
>>>>In this cursor the lines are separated only by the character 13.
>>>>
>>>>Then I use
>>>>
>>>>XmlAdpater.addtableschema
>>>>
>>>>and
>>>>
>>>>xmladapter.toxml
>>>>
>>>>To serialize the cursor. The XML comes Ok.
>>>>
>>>>Later I use
>>>>
>>>>xmladapter.loadxml
>>>>xmladapter.tables(1).tocursor
>>>>
>>>>to get the cursor back.
>>>>
>>>>In this moment the Memo field, has its lines separated by the character 10
>>>>instead of the character 13 that is in the original cursor.
>>>>
>>>>How can I solve this ?
>>>>
>>>>Thank you.
Previous
Reply
Map
View

Click here to load this message in the networking platform