查找 XML 地图的根元素名称
Contents
[
Hide
]
可能的使用场景
您可以使用 Aspose.Cells 的 XmlMap.RootElementName 属性来查找 XML 地图的根元素名称 。以下屏幕截图显示了 Microsoft Excel 中 XML 地图的根元素名称。
示例代码
以下示例代码加载了 示例 Excel 文件 并访问了第一个 XML 地图,并打印了它的 XmlMap.RootElementName 属性。请参见下面给出的示例代码的控制台输出。
This file contains 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-.NET | |
//Load sample Excel file having Xml Map | |
Workbook wb = new Workbook("sampleRootElementNameOfXmlMap.xlsx"); | |
//Access first Xml Map inside the Workbook | |
XmlMap xmap = wb.Worksheets.XmlMaps[0]; | |
//Print Root Element Name of Xml Map on Console | |
Console.WriteLine("Root Element Name Of Xml Map: " + xmap.RootElementName); |
控制台输出
Root Element Name Of Xml Map: MiscData