A very basic form that get you going and you can improve the code as you want.
static void CreateXML()
{
XmlDocument doc = new XmlDocument();
XmlNode rootNode = doc.CreateElement("etaalup_count");
doc.AppendChild(rootNode);
XmlNode countNode = doc.CreateElement("countnodes");
XmlAttribute serviceAttribute = doc.CreateAttribute("serviceid");
serviceAttribute.Value = "A022114704152";
countNode.Attributes.Append(serviceAttribute);
XmlAttribute countAttribute = doc.CreateAttribute("count");
countAttribute.Value = "10";
countNode.Attributes.Append(countAttribute);
rootNode.AppendChild(countNode);
countNode = doc.CreateElement("countnodes");
serviceAttribute = doc.CreateAttribute("serviceid");
serviceAttribute.Value = "A022114704153";
countNode.Attributes.Append(serviceAttribute);
countAttribute = doc.CreateAttribute("count");
countAttribute.Value = "15";
countNode.Attributes.Append(countAttribute);
rootNode.AppendChild(countNode);
countNode = doc.CreateElement("countnodes");
serviceAttribute = doc.CreateAttribute("serviceid");
serviceAttribute.Value = "A022114704154";
countNode.Attributes.Append(serviceAttribute);
countAttribute = doc.CreateAttribute("count");
countAttribute.Value = "5";
countNode.Attributes.Append(countAttribute);
rootNode.AppendChild(countNode);
doc.Save(Console.Out);
}