RespectNesting Property

Specifies whether the ToXML Method should nest tables based on the NestedInto Property setting, and whether nesting should be respected during XML parsing.

XMLAdapter.RespectNesting = [lValue]

Return Value

  • lValue
    Logical data type. The following table lists values for lValue.

    lValue Description

    False (.F.)

    Specifies that the ToXML method ignores the NestedInto property setting.

    True (.T.)

    Specifies that the ToXML method nests tables based on the NestedInto property.

Remarks

Applies to: XMLAdapter Class

When this property is set to False (.F.), the XMLAdapter behavior is the same as in Visual FoxPro 8.0. However, when RespectNesting is set to True (.T.), the Visual FoxPro 9.0 behavior differs as follows:

  • When loading a .NET Dataset schema, the LoadXML method sets the NestedInto, NextSiblingTable, and FirstNestedTable properties for all XMLTables objects based on the nesting information from the schema.

  • The ToCursor and ChangesToCursor methods (when only unchanged records are loaded) use the following parsing logic:

    • If a table is nested, its node must be an immediate child for the outer table’s node.

    • If a table isn't nested, its node must be an immediate child for the XMLAdapter's node.

  • If schema is generated, the ToXML method respects the nesting information and generates schema with appropriate nesting.

  • If XML is generated in diffgram + changes-only mode, an error is generated because the nested format is not supported for that mode.

  • The ToXML method appropriately nests data. The nesting is done based on the nesting information and the relation set from the outer cursor to the nested cursor. Note that a direct relation is required.

See Also

Reference

XMLAdapter Class
XMLTable Class
ToXML Method
ToCursor Method
ChangesToCursor Method
NestedInto Property
FirstNestedTable Property
NextSiblingTable Property

Other Resources

Properties (Visual FoxPro)