Geting all the tables


What is the simplest way of getting all the tables in the document.

I was doing it with adding each table from each section to one Tables object.


The best way to get child nodes of a particular type is using GetChildNodes method. In your case:

NodeCollection tables = doc.GetChildNodes(NodeType.Table, true, false);

Best regards,


Thank you for your solution and quick response!