The reason is that you don't have any records in the XML definition and you are not creating the XML with the schema definition. try doing the following:
CURSORTOXML("cTemp","xmlTemp",1,0, 0,"1")
Take note that the xmltocursor will produce the cursor win 1 empty record.
>Hi,
>I´ve had a strange behavior of XMLTOCURSOR function.
>I explain it:
>I comunicate 2 object, passing cursors trough XML, but when I need to send an empty cursor, with the code below, it crashes and gives me C0000005 error.
>
>CREATE CURSOR cTemp (cod N(3), data C(50))
>CURSORTOXML("cTemp","xmlTemp",1,0)
>XMLTOCURSOR(xmlTemp,"cTemp2",0)
>
>Can anyone explain me why this happens?
>
>Thanks in advance,
>Ibai
Alexandre Palma
Senior Application Architect