.NET Fiddle

CSharp · Console

/Program.cs

using System;
using System.Xml;
using Newtonsoft.Json;
					
public class Program
{
	public static void Main()
	{
		            string xml = "<?xml version=\"1.0\" encoding=\"utf - 8\"?>" +
                "<SalesOrder>  <Account>UK00BL1</Account>  <DeliveryAddress>    <AddressName>Blub Inc UK</AddressName>    <City>ELSON</City>    <ISOCountry>GB</ISOCountry>    <PostCode>SY12 5DQ</PostCode>    <Street>85  Whitchurch Road</Street>  </DeliveryAddress>  <DeliveryDate>19/07/2021</DeliveryDate>  <Lines>    <CurrencyISO>GBP</CurrencyISO>    <ItemCode>BL00100W</ItemCode>    <ItemName>Bulb 100W</ItemName>    <LineID>1</LineID>    <Price>1.5</Price>    <Qty>3</Qty>    <UnitID>ea</UnitID>  </Lines>  <Lines>    <CurrencyISO>GBP</CurrencyISO>    <ItemCode>LED0010</ItemCode>    <ItemName>Bulb LED 10W</ItemName>    <LineID>2</LineID>    <Price>15.45</Price>    <Qty>2</Qty>    <UnitID>box</UnitID>  </Lines>  <Name>Bulb Inc. ELSON</Name></SalesOrder>";
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(xml);

            string json = JsonConvert.SerializeXmlNode(doc, Newtonsoft.Json.Formatting.Indented, true);

            Console.WriteLine(json);
	}
}
;