Edit

Share via


Word.CustomXmlReplaceChildNodeOptions interface

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Removes the specified child node and replaces it with a different node in the same location.

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

Properties

name

If provided, specifies the base name of the replacement element.

namespaceUri

If provided, specifies the namespace of the replacement element. This property is required to replace nodes of type element or attribute; otherwise, it's ignored.

nodeType

If provided, specifies the type of the replacement node. If the property isn't specified, it's assumed to be of type element.

nodeValue

If provided, specifies the value of the replacement node for those nodes that allow text. If the node doesn't allow text, the property is ignored.

Property Details

name

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

If provided, specifies the base name of the replacement element.

name?: string;

Property Value

string

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

namespaceUri

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

If provided, specifies the namespace of the replacement element. This property is required to replace nodes of type element or attribute; otherwise, it's ignored.

namespaceUri?: string;

Property Value

string

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

nodeType

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

If provided, specifies the type of the replacement node. If the property isn't specified, it's assumed to be of type element.

nodeType?: Word.CustomXmlNodeType | "element" | "attribute" | "text" | "cData" | "processingInstruction" | "comment" | "document";

Property Value

Word.CustomXmlNodeType | "element" | "attribute" | "text" | "cData" | "processingInstruction" | "comment" | "document"

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

nodeValue

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

If provided, specifies the value of the replacement node for those nodes that allow text. If the node doesn't allow text, the property is ignored.

nodeValue?: string;

Property Value

string

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]