Instead of
configDoc.RemoveChild(projectNodes[i]);
try
projectNodes[i].parentNode.RemoveChild(projectNodes[i]);
More Related Contents:
- Read XML Attribute using XmlDocument
- How would you compare two XML Documents?
- How to prevent blank xmlns attributes in output from .NET’s XmlDocument?
- Reading XML with an “&” into C# XMLDocument Object
- Generate C# class from XML
- How to serialize/deserialize to `Dictionary` from custom XML not using XElement?
- Serializing private member data
- What is the simplest way to get indented XML with line breaks from XmlDocument?
- How to change XML Attribute
- How to deal with XML in C#
- Serialize Property as Xml Attribute in Element
- .net XML Serialization – Storing Reference instead of Object Copy
- What is the difference between Linq to XML Descendants and Elements
- How to decode string to XML string in C#
- How to store data locally in .NET (C#) [closed]
- get line number for XElement here
- Entity Framework with XML Files [closed]
- Read a XML (from a string) and get some fields – Problems reading XML
- How to modify existing XML file with XmlDocument and XmlNode in C#
- XML Parsing – Read a Simple XML File and Retrieve Values
- Error Deserializing Xml to Object – xmlns=” was not expected
- XmlTextReader vs. XDocument
- Generating XML file using XSD file
- Custom xmlWriter to skip a certain element?
- Data at the root level is invalid. Line 1, position 1 -why do I get this error while loading an xml file?
- XmlSerializer Performance Issue when Specifying XmlRootAttribute
- Finding element in XDocument?
- How can I remove empty xmlns attribute from node created by XElement
- How do I return XML from a Stored Procedure?
- How to add xmlnamespace to a xmldocument