Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Specifies the import options and may contain one or more following properties:

Remarks

ColumnsXPath is used to specify additional secondary mapping path by XPath argument.

This method does not call save method callsavemethod after execuiton. If you want to save changestosavechanges, you need to explicitly call Save method or use$Database.ImportFromXmlinstead.

Example

Common use for importing data

Code Block
languagejs
var table = $Database.Get({
    Parameters : {
        TargetSchema : 'HR',
        TargetTable : 'Groups'
    }
});

table.ImportFromXml({
    XPath : 'Groups/Group'
});

table.Save();

Example

Using map function

Code Block
languagejs
var table = $Database.Get({
    Parameters : {
        TargetSchema : 'HR',
        TargetTable : 'Groups'
    }
});

table.ImportFromXml({
    XPath : 'Groups/Group',
    map : function (node) {
        this.Id = node.Evaluate('../Id');
    }
});

table.Save();

...