XML Mapのルート要素名を検索する
Contents
[
Hide
]
可能な使用シナリオ
XMLマップのルートエレメント名をAspose.Cells for Python via .NETのXmlMap.root_element_nameプロパティを使用して取得できます。以下のスクリーンショットは、Microsoft ExcelのXMLマップのルート要素名を示しています。
サンプルコード
次のサンプルコードは、sample Excel fileを読み込み、最初のXMLマップにアクセスし、そのXmlMap.root_element_nameプロパティを出力します。
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
from aspose.cells import Workbook | |
# 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 | |
wb = Workbook("sampleRootElementNameOfXmlMap.xlsx") | |
# Access first Xml Map inside the Workbook | |
xmap = wb.worksheets.xml_maps[0] | |
# Print Root Element Name of Xml Map on Console | |
print("Root Element Name Of Xml Map: " + xmap.root_element_name) |
コンソール出力
Root Element Name Of Xml Map: MiscData