Table of Contents

Method FindNode

Namespace
DocWright.Word
Assembly
DocWright.Word.dll

FindNode(DomNodeId)

Returns the node with an id, if it is still in this document.

public DomNode? FindNode(DomNodeId id)

Parameters

id DomNodeId

An id read from NodeId of a node of this document.

Returns

DomNode

The node, or null when the id is None, was never given by this document, or names a node that has since been removed from it or moved to another document.

Remarks

A table lookup, plus a walk from the node up to the document to check it is still here. A node that is moved within the document is found under the id it had, and so is a removed node that is put back, as long as something held it in between: the table references its nodes weakly, so a removed node nobody holds is collected, and its id then names nothing.