TX Text Control .NET Server

LoadXMLDatabase Method

Method|Introduced in 23.0
Namespace
TXTextControl.Web.MVC
Package
TXTextControl.Web as TXTextControl.Web.DocumentEditor.dll from nuget.org, the private NuGet feed or Text Control Offline Packages

Description

Loads an XML database which is used to create table and field name menu items in the mailings ribbon tab.

Syntax

LoadXMLDatabase(string)

Loads an XML database from a file.

public TextControl LoadXMLDatabase(string fileName);
ParameterDescription
fileName

Specifies an xml file from which the database is loaded.

LoadXMLDatabase(XmlDocument)

Loads an XML database from an XmlDocument object.

public TextControl LoadXMLDatabase(XmlDocument xmlDocument);
ParameterDescription
xmlDocument

Specifies an XmlDocument object from which the database is loaded.

LoadXMLDatabase(FileStream)

Loads an XML database from a file stream.

public TextControl LoadXMLDatabase(FileStream fileStream);
ParameterDescription
fileStream

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

Return Value

A reference to the Web.MVC.TextControl instance to allow method chaining.

Examples

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

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