https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/xmlelement/xmlelement-addfirst-method
XmlElement.AddFirst(Any,...) Method - Business Central | Microsoft Learn
Adds the specified content at the start of the child list of this element.
business centralxmlelementmethodmicrosoftlearn