Export metadata, either from the active database outline or an input outline file, to a specified XML file. Permission required: database manager.
Syntax

You can export metadata information from a database in the following ways using export outline.
| Keyword | Description |
|---|---|
| DBS-NAME | Specify the database name instead of the outline file path. |
| FILE-NAME | Specify the outline file path instead of the database name. |
| all dimensions | Export information about all dimensions in the database. |
| list dimensions | Export information about only the listed dimensions. Specify each dimension name within curly braces, and separated by commas. |
| tree | Export only the member names in the hierarchy, omitting full metadata details. |
| with alias_table | Export using only the member names indicated in the specified alias table. |
| to xml_file | Specify the full path to the output XML file. |
Notes
- This statement requires the database to be started.
- The following general outline information is included in the XML export:
- Case sensitiveness
- Outline Type
- Duplicate Member Names allowed
- Typed Measures Enabled
- Date Format
- Varying Attributes Enabled
- Alias Table count and list
- Active Alias Table
- Attribute information
- Auto configure
- Text list definitions
- Universal member comments
- Locale, if it exists
- Query hint list (if aggregate storage)
- Get Implied Shared Setting
- The following dimension information is included in the XML export:
- Name
- Two pass calc
- Type
- Text list, if text typed
- Has relational descendants
- IsHAEnabled (Hybrid Analysis enabled)?
- Formula
- Format String
- Comment
- Extended member comment
- Dimension category
- Attribute type
- Data Storage
- Dimension Storage
- Alias Names, if any
- UDAs, if any
- Consolidation
- Attribute dimension associated
- Independent dimensions, if any
- Time balance
- Skip options
- Variance reporting
- Currency conversion
- Currency conversion member
- Dynamic Time Series enabled list
- Attachment level, if linked attribute dimension
- Dimension solve order
- Is Non Unique dimension?
- Hierarchy type
- Level usage for aggregation (for aggregate storage hierarchies)
- Is Compression dimension? (if aggregate storage)
- Storage category
- The following member information is included in the XML export:
- Name
- Two pass calc
- Type
- Text list, if text typed
- Is shared?
- Shared member name, if shared
- Formula
- Format string
- Comment
- Extended member comment
- Attribute type
- Data storage
- Dimension storage
- Alias names, if any
- UDAs, if any
- Consolidation
- Attribute member associated
- Validity sets, if any
- Time balance
- Skip options
- Variance reporting
- Currency conversion
- Currency conversion member
- Member solve order (if aggregate storage)
- Level usage for aggregation (for aggregate storage hierarchy members)
Example
export outline sample.basic all dimensions to xml_file "c:/temp/basic.xml";
Exports all outline information from Sample Basic to the specified XML file, basic.xml.
export outline sample.basic list dimensions {"Product", "Market"} tree to xml_file "c:/temp/basic.xml";
Exports information about Sample Basic dimensions Product and Market from to the XML file.
Export outline "c:/temp/basic.otl" all dimensions with alias_table "Default" to xml_file "c:/temp/basic.xml";
Exports information about all dimensions in Sample Basic from the specified outline file to the XML file, using only default alias names.
You can do this using the below method
ResponderEliminarMaxl to export the outline into an xml file
export outline sample.basic all dimensions to xml_file "c:/temp/test.xml";
Java To create a parent-child format file from the above xml file
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Element;
import java.io.BufferedWriter;
import java.io.File;
import java.io.*;
public class outline1 {
public static void main(String argv[]) {
try
{
File fXmlFile = new File("test.xml");;
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(fXmlFile);
doc.getDocumentElement().normalize();
BufferedWriter out = new BufferedWriter(new FileWriter("Test1.txt"));
NodeList AppList = doc.getElementsByTagName("Member") ;
for(int i= 0; i <AppList.getLength() ; i ++)
{
Element MbrElement = (Element) AppList.item(i);
System.out.println(MbrElement.getAttribute("name"));
Element PMbrElement = (Element) MbrElement.getParentNode();
NodeList AliasNodes = MbrElement.getElementsByTagName("Alias");
Element AliasEle = (Element) AliasNodes.item(0);
if (AliasNodes.getLength() != 0 )
{
out.write( PMbrElement.getAttribute("name") + "|" + MbrElement.getAttribute("name") + "|" + AliasEle.getTextContent() + "|" + MbrElement.getAttribute("DataStorage"));
out.newLine();
}
else
{
out.write( PMbrElement.getAttribute("name") + "|" + MbrElement.getAttribute("name") + "|" + "" + "|" + MbrElement.getAttribute("DataStorage"));
out.newLine();
}
}
out.close();
}
catch (Exception e) {
e.printStackTrace();
}
}
}