Menu
  • HOME
  • TAGS

XmlNode.AppendChild fails

c#,xml,system.xml

You did not call the CreateItem method, so it did not actually create an <item>, so there was nothing to append. How about: public static void Main() { var doc = new XmlDocument(); var content = doc.CreateElement("content"); doc.AppendChild(content); var item = CreateItem(doc, "the hint", "the type", "the title", "the value");...