Skipping Header/Footer

Is there a way to “skip” past the header and footer of a document?
For example, I would like to find the first (or actually all) tables in the document, that are not in the header and footer.
Thank you for you help,
matt

Hi Matt,

Thanks for your inquiry.

Sure, you can either of the two methods below:

NodeList tables = doc.SelectNodes("//Body/Table");

Or

foreach(Table table in doc.GetChildNodes(NodeType.Table, true))
{
    if (table.GetAncestor(NodeType.HeaderFooter) == null)
    {
        // This is a table in the document body.
    }
}

If we can help with anything else, please feel free to ask.

Thanks,

Thanks for the quick reply, this worked perfectly.
Thanks!