Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to prevent XMLTOCURSOR from throwing away leading ze
Message
De
12/12/2005 10:48:31
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Divers
Thread ID:
01077117
Message ID:
01077145
Vues:
66
Thanks Sergey. Your code does the trick.

I tried to modify it slightly to eliminate the TEXT TO command and use the XML string that oHTTP.ResponseText returns but it fails to put any records into the cursor. Any idea why it doesn't work this way? I'm trying to prevent having to do the intermediate step of STRTOFILE(oHTTP.ResponseText).

Mike

>
TEXT TO lcXml NOSHOW
><?xml version="1.0" ?>
><LWRESPONSE>
><M_0>
><MNUM>V509850</MNUM>
><LUD>091220050239</LUD>
></M_0>
><M_1>
><MNUM>F2525799</MNUM>
><LUD>091220050246</LUD>
></M_1>
></LWRESPONSE>
>ENDTEXT
>
>CREATE CURSOR Test ( Mnum C(8), Lud C(12))
>XMLTOCURSOR(lcXml, ALIAS(), 8192)
>BROWSE LAST NOWAIT
>
>>
>>I'm trying to use XMLTOCURSOR on the following string:
>>
>>
>><?xml version="1.0" ?>
>><LWRESPONSE>
>><M_0>
>><MNUM>V509850</MNUM>
>><LUD>091220050239</LUD>
>></M_0>
>><M_1>
>><MNUM>F2525799</MNUM>
>><LUD>091220050246</LUD>
>></M_1>
>></LWRESPONSE>
>>
>>
>>After it converts to a cursor, the values in the LUD field have dropped the leading zero. The values in the cursor are "91220050239" and "91220050246". Is there a way to keep all digits using XMLTOCURSOR()?
>>
>>TIA
>>
>>Mike
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform