TX Text Control .NET Server

LoadXMLDatabaseAsync Method

Method|Introduced in 21.0
Namespace
TXTextControl.Web
Package
None: the TX Text Control .NET Server setup installs it, for .NET Framework.
Assembly
TXTextControl.Web.dll

Description

Loads an XML database which is used to create table and field name menu items in the mailings ribbon tab. The method returns immediately and does not wait for the database to be completely loaded.

Syntax

LoadXMLDatabaseAsync(String)

Loads an XML database from a file.

public async System.Threading.Tasks.Task LoadXMLDatabaseAsync(string fileName);
ParameterDescription
fileName

Specifies an xml file from which the database is loaded.

LoadXMLDatabaseAsync(System.Xml.XmlDocument)

Loads an XML database from an XmlDocument object.

public async System.Threading.Tasks.Task LoadXMLDatabaseAsync(System.Xml.XmlDocument xmlDocument);
ParameterDescription
xmlDocument

Specifies an XmlDocument object from which the database is loaded.

LoadXMLDatabaseAsync(System.IO.FileStream)

Loads an XML database from a file stream.

public async System.Threading.Tasks.Task LoadXMLDatabaseAsync(System.IO.FileStream fileStream);
ParameterDescription
fileStream

Specifies an xml file from which the database is loaded. The data is loaded from the stream's current position.

Examples

The following example uses TextControl.LoadXMLDatabase in a document-processing workflow.

var result = textControl.LoadXMLDatabase(@"App_Data\document.docx");
Console.WriteLine(result);