Javascript: TXTextControl.loadXMLDatabase Method
Description
Loads an XML database which is used to create table and field name menu items in the mailings ribbon tab.
Syntax
<void> TXTextControl.loadXMLDatabase(<string> xmlData, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| xmlData | Specifies the xml document content from which the database is loaded. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TXTextControl.loadXMLDatabase in a practical document-editing workflow. It loads an XML database which is used to create table and field name menu items in the mailings ribbon tab.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.loadXMLDatabase(
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAFgAH/qbPzWQAAAABJRU5ErkJggg==",
function() {
console.log("load xmldatabase completed.");
},
onTxError
);