OpenXmlElement.Ancestors method

Office 2013 and later

Enumerates all of the current element's ancestors.

Namespace:  DocumentFormat.OpenXml
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

public IEnumerable<OpenXmlElement> Ancestors()

Return value

Type: System.Collections.Generic.IEnumerable<OpenXmlElement>
An IEnumerable object that contains a list of the current OpenXmlElement element's ancestors.
Show: