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--