Find the Root Element Name of XML Map with Node.js via C++

Possible Usage Scenarios

You can find the root element name of the XML map using Aspose.Cells for Node.js via C++ with the XmlMap.getRootElementName() property. The following screenshot shows the root element name of the XML map in Microsoft Excel.

todo:image_alt_text

Sample Code

The following sample code loads the sample Excel file, accesses the first XML map, and prints its XmlMap.getRootElementName() property. See the console output below.

const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "sampleRootElementNameOfXmlMap.xlsx");

// Load sample Excel file having Xml Map
const wb = new AsposeCells.Workbook(filePath);

// Access first Xml Map inside the Workbook
const xmap = wb.getWorksheets().getXmlMaps().get(0);

// Print Root Element Name of Xml Map on Console
console.log("Root Element Name of XML Map: " + xmap.getRootElementName());

Console Output

Root Element Name of XML Map: MiscData