GetClassType
Returns a type of the ApiCustomXmlNode class.
Syntax
expression.GetClassType();
expression - A variable that represents a ApiCustomXmlNode class.
Parameters
This method doesn't have any parameters.
Returns
"customXmlNode"
Example
Retrieve the class type of a custom XML node in a spreadsheet.
// How to identify the class type of a custom XML node in a spreadsheet?
// Obtain the class type identifier of a custom XML node object in a spreadsheet.
let worksheet = Api.GetActiveSheet();
let xmlManager = worksheet.GetCustomXmlParts();
let xmlText = `
<?xml version="1.0" encoding="UTF-8"?>
<zoo>
<animal species="Lion" id="101">
<name>Leo</name>
<age>5</age>
<habitat>Savanna</habitat>
<diet>Carnivore</diet>
</animal>
</zoo>`;
let xml = xmlManager.Add(xmlText);
let node = xml.GetNodes('/zoo/animal')[0];
let classType = node.GetClassType();
worksheet.GetRange("A1").SetValue("Class type of the node: " + classType);