Exports lookup table data to the specified XML file. If the file exists, InterSystems IRIS overwrites it with new data. If the file does not already exist, InterSystems IRIS creates it. The following example exports only the contents of the specified lookup table, myTab:
do ##class(Ens.Util.LookupTable).%Export("myFile.xml","myTab")
The following example exports the contents of all lookup tables in the namespace:
do ##class(Ens.Util.LookupTable).%Export("myFile.xml")
The resulting XML file looks like the following example. Note that all entries, in all tables, appear as sibling <entry> elements inside a single <lookupTable> element.
<?xml version="1.0"?>
<lookupTable>
<entry table="myOtherTab" key="myKeyA">aaaaaa</entry>
<entry table="myOtherTab" key="myKeyB">bbbbbbbbb</entry>
<entry table="myTab" key="myKey1">1111</entry>
<entry table="myTab" key="myKey2">22222</entry>
<entry table="myTab" key="myKey3">333333</entry>
</lookupTable>
For each <entry>, the table attribute identifies the table that contains the entry. The key attribute gives the name of the key. The text contents of the <entry> element provide the entry’s value.