跳到主要内容

InsertElement

Inserts an XML element at the specified XPath.

Syntax

expression.InsertElement(xPath, xmlStr, index);

expression - A variable that represents a ApiCustomXmlPart class.

Parameters

NameRequired/OptionalData typeDefaultDescription
xPathRequiredstringThe XPath of the parent node where the new element will be inserted.
xmlStrRequiredstringThe XML string to insert.
indexOptionalnumberThe position at which to insert the new XML element. If omitted, the element will be appended as the last child.

Returns

boolean