Share via


ToCursor Method

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

ToCursor is supported only for XMLTable objects in the XMLAdapterTables collection.

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

Parameters

  • lAppend
    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.
  • cAlias
    Specifies the alias for the target cursor. The value of cAlias defaults to the XMLTableAlias property, including when cAlias is an empty string ("").
  • Reserved
    Reserved for future use. The default value is 0.

Remarks

If the XMLFieldAlias property is empty, the XMLTableToCursor 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