LoadFromXml(Reader: Variant);
Reader. XML element, from which search service parameters are loaded.
The LoadFromXml method loads search service settings from the specified XML element.
As the Reader parameter, determine an XML element described by the IXmlDomElement interface. The structure of child elements must be generated using the SaveToXml method.
Executing the example requires a file named SearchEngine.xml in the root directory of the disc C. Search service parameters should be saved in the file. Add links to the BISearch, Metabase, XML system assemblies.
Sub UserProc;
Var
MB: IMetabase;
SearchFactory: ISearchEngineServiceFactory;
SearchEngine: ISearchEngineServiceBase;
XMLDoc: IXMLDOMDocument3;
Begin
MB := MetabaseClass.Active;
SearchFactory := New SearchEngineServiceFactory.Create;
SearchEngine := SearchFactory.CreateSearchEngine(MB);
//Load settings from XML file
XMLDoc := New DOMDocument60.Create;
XMLDoc.load("c:\SearchEngine.xml");
SearchEngine.LoadFromXml(XMLDoc.documentElement);
//...
//Work with search platform
//...
End Sub UserProc;
On executing the example an object that gives access to the search service is created. Object settings will be loaded from the specified file.
See also: