ICubeMetaUpdateEx.SaveToXml

Syntax

SaveToXml(WriterXml: Variant; Metabase: IMetabase);

Parameters

WriterXml. Object, to which parameters of time series database copying are saved as XML code.

Metabase. The repository that contains copied time series database.

Description

The SaveToXml method saves parameters of time series database copying as XML code.

Example

Executing the example requires that the repository contains a time series database with the FC identifier.

Sub Main;

Var

mb: IMetabase;

RubUpdateEx: ICubeMetaUpdateEx;

Rub: IRubricator;

CrInfo: IMetabaseObjectCreateInfo;

s: string;

XmlDoc: IXMLDOMDocument3;

el: IXmlDomElement;

Begin

mb := MetabaseClass.Active;

RubUpdateEx := New CubeMetaUpdateClass.Create As ICubeMetaUpdateEx;

Rub := mb.ItemById("FC").Bind As IRubricator;

RubUpdateEx.Rubricator := Rub;

RubUpdateEx.Metabase := Mb;

CrInfo := RubUpdateEx.CreateInfo;

CrInfo.Parent := mb.Root;

s := Mb.GenerateId("FC_COPY");

CrInfo.Id := s;

CrInfo.Name := s;

RubUpdateEx.CopyData := True;

RubUpdateEx.CopyExtraObjects := False;

RubUpdateEx.RdsDatabase := Rub.Database;

XmlDoc := New DOMDocument60.Create;

el := XmlDoc.createElement("Root");

XmlDoc.appendChild(el);

RubUpdateEx.SaveToXml(el, mb);

XmlDoc.save("C:\FC_COPY.XML");

End Sub Main;

After executing the example time series database copying parameters as XML code are saved to the C:\FC_COPY.XML file. In the file parameters are contained in the Root section.

See also:

ICubeMetaUpdateEx