Esempio n. 1
0
        public void TestNodeCleaner()
        {
            string      xml = @"<Docs>
    <summary>To be added.</summary>
    <param name=""one"">To be added.</param>
    <param name=""two"">written docs</param>
<param name=""three"">Written but not provided</param>
</Docs>"; string xml2 = @"<Docs>
    <param name=""two"">written docs</param>
</Docs>";
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(xml);

            XmlDocument incomingDoc = new XmlDocument();

            incomingDoc.LoadXml(xml2);
            DocUtils.ClearNodesIfNotDefault(doc.FirstChild, incomingDoc.FirstChild);
            Assert.IsTrue(doc.FirstChild.ChildNodes.Count == 3);
        }