You didn't specify that the first parameter is a file name (flag=512).
XMLTOCURSOR("sync_profile.xml", "crsFromXml", 512)
>use code to create this xml file
>
>
><?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
><VFPData>
> <xsd:schema id="VFPData" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
> <xsd:element name="VFPData" msdata:IsDataSet="true">
> <xsd:complexType>
> <xsd:choice maxOccurs="unbounded">
> <xsd:element name="sync_profile" minOccurs="0" maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="lastid" type="xsd:int"/>
> <xsd:element name="upddttm" type="xsd:dateTime"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:choice>
> <xsd:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="lax"/>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> <sync_profile>
> <lastid>206443</lastid>
> <upddttm>2010-03-08T07:59:11</upddttm>
> </sync_profile>
></VFPData>
>
>
>
>and this is the code:
>
>CREATE CURSOR sync_profile (lastID i,upddttm t)
>append blank
>REPLACE lastid with 14438 , upddttm WITH DATETIME()
>CURSORTOXML("sync_profile","sync_profile.xml",0,512,0,"1")
>
>
>i get an error with this
>XMLTOCURSOR("sync_profile.xml")
>
>
>xml parser error; invalid at the top level of document
>
>
>wha am I doing wrong here ????
>
>
>Thnaks
>
>
>Peter
--sb--