Find first table after a particular node

Hello,

Starting at any given node in a document, how can I find the next occurring Table node?

If the next table is a child of the source node, we can find using:

var nextTable = sourceNode.ParentNode.GetChild(NodeType.Table, 0, true) as Table

But how can we find the next table if it several paragraphs away?

Thanks

@ast3 If the source node is on the same level as the table, you can use Node.NextSibling property.
If the source node is not on the same level, you can use Node.NextPreOrder method to achieve this.

Thank you, Node.NextPreOrder works ideally.