https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.openxmlelement.elementsbefore?view=openxml-3.0.1
OpenXmlElement.ElementsBefore Method (DocumentFormat.OpenXml) | Microsoft Learn
Enumerates all of the sibling elements that precede the current element and have the same parent as the current element.
methodopenxmlmicrosoftlearn