Find the Root Element Name of XML Map
Contents
[
Hide
]
Possible Usage Scenarios
You can find the Root Element Name of XML Map using Aspose.Cells with XmlMap.RootElementName property. The following screenshot shows the root element name of the XML Map in Microsoft Excel.
Sample Code
The following sample code loads the sample Excel file and accesses the first XML Map and prints its XmlMap.RootElementName property. Please see the console output of the sample code given below.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
//Load sample Excel file having Xml Map | |
Workbook wb = new Workbook("sampleRootElementNameOfXmlMap.xlsx"); | |
//Access first Xml Map inside the Workbook | |
XmlMap xmap = wb.getWorksheets().getXmlMaps().get(0); | |
//Print Root Element Name of Xml Map on Console | |
System.out.println("Root Element Name Of Xml Map: " + xmap.getRootElementName()); |
Console Output
Root Element Name Of Xml Map: MiscData