Table of Contents

Property NodeId

Namespace
DocWright.Dom
Assembly
DocWright.Dom.dll

NodeId

Gets this node's identity within its document instance, assigning one on first read.

public DomNodeId NodeId { get; }

Property Value

DomNodeId

Remarks

The id stays the same while the node is in its document, whatever is inserted, removed or moved around it, and when the node itself is moved within the document. A clone has an id of its own. A node not attached to a document has None; once attached, it has the id it had, or a new one if it never had one in that document. FindNode(DomNodeId) returns the node for an id.

Ids are kept in memory only and are never written to a file. Reading one costs a walk to the document and, the first time, an entry in the document's id table.

Not to be confused with the Id of a Note, a BookmarkStart or a BookmarkEnd: those are Word's own ids, read from and written to the file.