Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with XMLTOCURSOR
Message
 
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
01125882
Message ID:
01125885
Views:
21
This message has been marked as the solution to the initial question of the thread.
You're missing a root level tag
TEXT TO lcXMLString NOSHOW 
<Root>
	<Message>
		<Description>Description to go here.</Description>
	</Message>
</Root>	
ENDTEXT

CREATE CURSOR TempCursor (Description C(30))
? XMLTOCURSOR(lcXMLString,'TempCursor',8192) 
BROWSE LAST NOWAIT
>Has anyone got any ideas why, when I run the code below, I just end up with an empty cursor:
>lcXMLString = "[Message]"+ ;
> "[Description]Description to go here.[/Description]+ ;
> "[/Message]"
>CREATE CURSOR TempCursor (Description C(30))
>XMLTOCURSOR(lcXMLString,'TempCursor',8192)
>browse
>
>I was expecting to end up with the cursor field 'Description' populated with 'Description to go here.'.
>I've changed the angle brackets to square brackets so that I can enter the details here (it wouldn't let me type xml into this message).
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform