Cubes > Cubes Assembly Interfaces > ICubeMetaUpdateEx > ICubeMetaUpdateEx.SaveToXml
SaveToXml(WriterXml: Variant; Metabase: IMetabase);
WriterXml. Object, to which parameters of time series database copying are saved as XML code.
Metabase. The repository that contains copied time series database.
The SaveToXml method saves parameters of time series database copying as XML code.
Executing the example requires that the repository contains a time series database with the FC identifier.
Sub UserProc;
Var
Mb: IMetabase;
RubUpdateEx: ICubeMetaUpdateEx;
Rub: IRubricator;
CrInfo: IMetabaseObjectCreateInfo;
XmlDoc: IXMLDOMDocument3;
Element: IXmlDomElement;
s: string;
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;
Element := XmlDoc.createElement("Root");
XmlDoc.appendChild(Element);
RubUpdateEx.SaveToXml(Element, Mb);
XmlDoc.save("C:\FC_COPY.XML");
End Sub UserProc;
After executing the example parameters of time series database copying are saved to the specified file as XML code. The parameters are contained in the Root section of the file.
See also: