<cats calico="count">1</cats>
"cats" is a
node
, with the value "1"; "calico" is an
attribute
with the value "count".
Your code is trying to create "count" as an attribute - so it's being created that way.
Try something like:
XmlNode cats = doc.CreateElement("cats");
cats.Value = 1;
XmlAttribute countAttribute = doc.CreateAttribute("calico");
countAttribute.Value = "count";
cats.Attributes.Append(countAttribute);
You may have to play with it to get the code right - I'm on a tablet and it's hard to test code so I'm relying on memory ...