ToCursor Method

Visual Studio .NET 2003

Creates a cursor specified by XMLTable with the fields described by the XMLTable Fields collection and loads it with data from the referenced XML document.

ToCursor is supported only for XMLTable objects in the XMLAdapter Tables collection.

XMLTable.ToCursor( [ lAppend [, cAlias [, Reserved ]]] )


Specifies whether to append data or records to an existing cursor specified by the cAlias parameter. The following table lists the values for lAppend.
lAppend Description
False (.F.) Does not add fields to an existing cursor. (Default)
True. (.T.) Adds fields to an existing cursor.
Specifies the alias for the target cursor. The value of cAlias defaults to the XMLTable Alias property, including when cAlias is an empty string ("").
Reserved for future use. The default value is 0.


If the XMLField Alias property is empty, the XMLTable ToCursor method disregards XMLField objects and creates a cursor that does not include any fields specified by those XMLField objects.

When you use ToCursor in append mode, Visual FoxPro adds an empty row if no XMLField object name matches any cursor column.

When mapping binary fields to Character data types, Visual FoxPro fills any remaining white space with 0x00 characters (CHR(0) or zeros) after decoding.

See Also

Methods | XMLTable Object Properties, Methods, and Events | Fields Collection (XMLTable) | XMLName Property | Fields Collection (XMLTable) | Alias Property | ToCursor Method | XMLField Class

Applies To: XMLTable Class