Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Edit a file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01416197
Message ID:
01416374
Vues:
62
>You've to specify additional flag (IIRC 8192) if you want XMLTOCURSOR() to use existing cursor.
>It would be more helpful if you attached a ZIP file with sample XML.
>
>>
>>
>>Thanks, that worked great. I formatted my XML correctly and now I'm trying to get it into my cursor. The problem is that all the columns I selected (statement # 7) when creating the cursor disappeared and the cursor now contains an empty "Detail" column. I use the 512 on parameter after trying all the other parameter in the XMLTOCURSOR statement. Here is my code:
>>
>>
>>1  cPreTag = '<?xml version = "1.0"?><Report>'
>>2  cPostTag = "</Report>"
>>3  cTagName = STREXTRACT(FILETOSTR("C:\test2\PayRegExtract.xml"),"<Table1>","</Table1>",1,1)
>>4  cPassTag = cPreTag+cTagName+cPostTag
>>5  MESSAGEBOX(cPassTag,0,'')
>>6  STRTOFILE(cPassTag,"C:\test2\convert.xml",0)
>>7  SELECT * from xfer_payroll INTO CURSOR crsparse readwrite
>>8  XMLTOCURSOR("C:\test2\convert.xml","crsparse",512)
>>
>>
>>The XML looks as follows:
>>
>>
>><?xml version = "1.0"?><Report><Detail_Collection><Detail PP="2009-14" NAME="ABBATOYE ........
>>
>>
>>I have also attach a sample of xml layout and the cursor before and after the import. Do you guys see anything wrong with my xml format that prevents me from bring it back into a cursor?
>>
>>Thank
>>nick


Thanks for answering back Sergey. I change the command to following:
XMLTOCURSOR("C:\test2\convert.xml","crsparse",512+8192)
all the columns appeared except there was no data. I have attached a sample of xml file. thanks. ..Nick
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform