Skip to main content

GetId

Returns the ID of the custom XML part.

Syntax

expression.GetId();

expression - A variable that represents a ApiCustomXmlPart class.

Parameters

This method doesn't have any parameters.

Returns

string

Example

This example shows how to retrieve the ID of a custom XML part.

let doc = Api.GetDocument();
let xmlManager = doc.GetCustomXmlParts();
let xml = xmlManager.Add("<content xmlns='http://example'></content>");
let xmlId = xml.GetId();
let paragraph = Api.CreateParagraph();
paragraph.AddText("Custom XML ID: " + xmlId);
doc.Push(paragraph);