C# generate XML document

Date: 2019-10-24
XDocument doc = new XDocument(
	new XElement("SConnectData",
		new XElement("VerkoopOrders",
			new XElement("VerkoopOrder",
				new XElement("Ordernummer", new XText(orderNummer)),
				new XElement("Klantcode", new XText(klantCode)),
				new XElement("OrderRegels",
					orderLines.Select(l =>
						new XElement("Regel",
							new XElement("Artikelcode", new XText(l.ArticleId)),
							new XElement("Omschrijving", new XText(l.Description)),
							new XElement("Aantal", new XText(l.Quantity.ToString()))
						)
					)
				)
			)
		)
	)
);
doc.Save(@"C:\Temp\temp.xml");
26970cookie-checkC# generate XML document