Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Xmltocursor creates an empty record
Message
From
05/03/2009 06:05:36
 
 
To
05/03/2009 04:55:55
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01385736
Message ID:
01385740
Views:
36
Data records should be descendent of root element. XMLTOCURSOR is generating 10 records because your root element (SMS) has 10 children elements.

The XML should go like this:
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> 
<records>
 <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>
</records>
>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
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform