GetClassType
返回 ApiCustomXmlPart 类的类型。
语法
expression.GetClassType();
expression - 表示 ApiCustomXmlPart 类的变量。
参数
此方法没有任何参数。
返回值
"customXmlPart"
示例
检查文档中自定义 XML 部件返回的类类型。
// How do I check what type a custom XML part object is in a document?
// Retrieve and output the class type string for a custom XML part in a document.
let doc = Api.GetDocument();
let xmlManager = doc.GetCustomXmlParts();
let xml = xmlManager.Add("<content xmlns='http://example' version='1.0'></content>");
let classType = xml.GetClassType();
let paragraph = Api.CreateParagraph();
paragraph.AddText("Class type: " + classType);
doc.Push(paragraph);