Load(Element: IXMLDOMElement);
Load(Element: Prognoz.Platform.Interop.MsXml2.IXMLDOMElement);
Element. The XML element, from which data source or consumer parameters are downloaded.
The Load method loads data source or data consumer parameters from XML.
To save data source or consumer parameters in XML, use the IDtObject.Save method.
Executing the example requires an XML file C:\UserProvider.xml that contains custom data consumer parameters.Add links to the Metabase, Dt, Xml system assemblies.
Sub UserProc_Load;
Var
UsProv: IDtUserProviderEx;
Doc: FreeThreadedDOMDocument60;
Begin
UsProv := New DtUserProviderEx.Create;
UsProv.Metabase := MetabaseClass.Active;
Doc := New FreeThreadedDOMDocument60.Create;
Doc.load("C:\UserProvider.xml");
UsProv.Load(Doc.documentElement);
UsProv.Open;
Debug.WriteLine(UsProv.ImplClass);
UsProv.Close;
End Sub UserProc_Load;
After executing the example custom data consumer parameters are downloaded from the C:\UserProvider.xml file. The full name of the class implemented a custom algorithm to obtain the data will be displayed in the console.
Executing the example requires an XML file C:\UserProvider.xml that contains custom data consumer parameters.
Imports Prognoz.Platform.Interop.Dt;
Imports Prognoz.Platform.Interop.MsXml2;
Public Shared Sub Main(Params: StartParams);
Var
UsProv: IDtUserProviderEx;
Doc: FreeThreadedDOMDocument60;
Begin
UsProv := New DtUserProviderEx.Create();
UsProv.Metabase := Params.Metabase;
Doc := New FreeThreadedDOMDocument60.Create();
Doc.load("C:\UserProvider.xml");
UsProv.Load(Doc.documentElement);
UsProv.Open();
System.Diagnostics.Debug.WriteLine(UsProv.ImplClass);
UsProv.Close();
End Sub;
After executing the example custom data consumer parameters are downloaded from the C:\UserProvider.xml file. The full name of the class implemented a custom algorithm to obtain the data will be displayed in the console.
See also: