Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Xmltocursor creates an empty record
Message
From
05/03/2009 12:39:29
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
05/03/2009 04:55:55
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01385736
Message ID:
01385901
Views:
32
>Hi all
>
>i have the following xml that i put in a string variable :
>
> <?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> 
>- <SMS>
> <ID>00000036</ID> 
> <CONTENT>bert x1</CONTENT> 
> <RECIPIENT>+32475227556</RECIPIENT> 
> <SENDER>+32499978283</SENDER> 
> <SMSPORT>SYSTEMAT</SMSPORT> 
> <SMSID>0</SMSID> 
> <SYNSMSID>00000036</SYNSMSID> 
>  <STATUS>1</STATUS> 
> <SCSTAMP>2009030416:25540000</SCSTAMP> 
> <STAMP>2009030416:25540000</STAMP> 
> </SMS>
>
>
>step 1 : i create a cursor like this :
>CREATE CURSOR qrysms(ID c(8),content c(50),recepient c(50),sender c(50),smsport c(50),smsid c(10), synsmsid c(8),status n(2),scstamp c(50),stamp c(50))
>
>step 2
>i try to put the xml in my cursor
>XMLTOCURSOR(lcXml,'qrysms',8192)
>
>result :
>i get an empty line in my qrysms.
>
>does somebody knows whey the xmltocursor adds an empty line in stead of a line with data ?
>
>thnx

It has a single SMS record but missing 'table'.
Xmltocursor(Strtran(Strtran(m.lcXML, ;
  '<SMS>','<data><SMS>'),;
  '</SMS>','</SMS></data>'),;
  'qrysms',8192)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform