查找 XML 映射的根元素名称
Contents
[
Hide
]
可能的使用场景
你可以找到XML 映射的根元素名称使用 Aspose.Cells 与XmlMap.RootElementName财产。以下屏幕截图显示了 Microsoft Excel 中 XML 映射的根元素名称。
示例代码
下面的示例代码加载示例 Excel 文件并访问第一个 XML 映射并打印其XmlMap.RootElementName财产。请查看下面给出的示例代码的控制台输出。
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()); |
控制台输出
Root Element Name Of Xml Map: MiscData