using System.Collections.Generic;
public static void Main()
<Name>4Apply-onlineOnboarding</Name>
<ItemType>Group</ItemType>
<ItemType>Group</ItemType>
<ItemType>Group</ItemType>
XmlDocument doc = new XmlDocument();
var elements = doc.GetElementsByTagName("children");
var attribute = doc.CreateAttribute("json", "Array", "http://james.newtonking.com/projects/json");
attribute.InnerText = "true";
var node = elements.Item(0) as XmlElement;
node.Attributes.Append(attribute);
string json = JsonConvert.SerializeXmlNode(doc);