DevTreks.Data/EditHelpers/XmlIO.cs
/// <summary>
/// Remove the first child of the second to last node of the base document submitted
/// </summary>
/// <param name="newDocNode">node being appended to lastbaseNode</param>
/// <param name="lastBaseNode">node where new element is being appended</param>
/// <param name="baseDoc">document holding lastBaseNode</param>
Remove the first child of the second to last node of the base document submitted
Remove the first child of the second to last node of the base document submitted
public static void RemoveLastNode(XmlNode lastBaseNode, ref XmlDocument baseDoc)
        {
            if (lastBaseNode.HasChildNodes == true)
            {
                if (lastBaseNode.FirstChild.HasChildNodes == true)
                {
                    RemoveLastNode(lastBaseNode.FirstChild, ref baseDoc);
                }
                else
                {
                    lastBaseNode.RemoveChild(lastBaseNode.FirstChild);
                }
            }
            else
            {
                lastBaseNode.RemoveChild(lastBaseNode.FirstChild);
            }
        }
public static void RemoveLastNode ( XmlNode lastBaseNode , ref XmlDocument baseDoc ) { if ( lastBaseNode . HasChildNodes == true ) { if ( lastBaseNode . FirstChild . HasChildNodes == true ) { RemoveLastNode ( lastBaseNode . FirstChild , ref baseDoc ) ; } else { lastBaseNode . RemoveChild ( lastBaseNode . FirstChild ) ; } } else { lastBaseNode . RemoveChild ( lastBaseNode . FirstChild ) ; } }
Remove the first child of the second to last node of the base document submitted
Remove the first child of the second to last node of the base document submitted
lastBaseNode
XmlNode
node where new element is being appended
node where new element is being appended
XmlDocument
ref
newDocNode
node being appended to lastbaseNode
node being appended to lastbaseNode
baseDoc
document holding lastBaseNode
document holding lastBaseNode