I get the same error
here is the help entry:
CursorToXML(nWorkArea | cTableAlias, cOutput [, nOutputFormat [, cSchemaName [, cSchemaLocation [, cNameSpace [, nFlags]]]])
Returns
Numeric. The number of bytes written to the file or memvar
Parameters
nWorkArea
Specifies the work area of the table from which to create the XML string. If you specify 0, or nothing, Visual FoxPro uses the current work area.
cTableAlias
Specifies the alias of the table from which to create the XML string. If you specify "" or nothing, Visual FoxPro uses the table in the current work area.
cOutput
Specifies the name (and optionally, the path) of the memory variable or file that will contain the results of the function. The default nFlags setting sends the result to a memory variable. If the memory variable doesn't exist Visual FoxPro will create it. If you specify an existing file, that file will be overwritten. The SAFETY setting is observed
>Use three parameters. First param is the tablename or workarea; 2nd is type of output where 2 = element; 3rd is the output xml file name.
>Try this instead:
>
>
>cursorToXML('mytable', 2, 'test.xml')
>
>HTH.
>
>>Hi
>>select 0
>>use Mytable shared
>>?CursorToXML(0, "test.xml")
>>creates the following error:
>>'Function argument,value or count is invalid'
>>
>>Why? the Helpfile state only 2 parameters are required.
>>
>>Peter
Peter Cortiel