Exemple #1
0
 private void InsertChild(XmlDiffParentNode parent, XmlDiffNode newChild)
 {
   if (this._XmlDiff.IgnoreChildOrder)
   {
             var node1 = parent.FirstChildNode;
             var childNode = (XmlDiffNode) null;
     for (; node1 != null && XmlDiffDocument.OrderChildren(node1, newChild) <= 0; node1 = node1._nextSibling)
       childNode = node1;
     parent.InsertChildNodeAfter(childNode, newChild);
   }
   else
   {
     parent.InsertChildNodeAfter(this._curLastChild, newChild);
     this._curLastChild = newChild;
   }
 }
Exemple #2
0
        // Inserts the 'newChild' node. If child order is significant, the new child is
        // inserted at the end of all child nodes. If the child order is not signoficant,
        // the new node is sorted into the other child nodes.
        private void InsertChild(XmlDiffParentNode parent, XmlDiffNode newChild)
        {
            if (_XmlDiff.IgnoreChildOrder)
            {
                XmlDiffNode curChild  = parent.FirstChildNode;
                XmlDiffNode prevChild = null;

                while (curChild != null && (OrderChildren(curChild, newChild) <= 0))
                {
                    prevChild = curChild;
                    curChild  = curChild._nextSibling;
                }
                parent.InsertChildNodeAfter(prevChild, newChild);
            }
            else
            {
                parent.InsertChildNodeAfter(_curLastChild, newChild);
                _curLastChild = newChild;
            }
        }
    // Inserts the 'newChild' node. If child order is significant, the new child is
    // inserted at the end of all child nodes. If the child order is not signoficant,
    // the new node is sorted into the other child nodes.
    private void InsertChild( XmlDiffParentNode parent, XmlDiffNode newChild ) 
    {
        if ( _XmlDiff.IgnoreChildOrder ) 
        {
            XmlDiffNode curChild = parent.FirstChildNode;
			XmlDiffNode prevChild = null;

            while ( curChild != null && ( OrderChildren( curChild, newChild ) <= 0 ) ) 
            {
                prevChild = curChild;
                curChild = curChild._nextSibling;
            }
            parent.InsertChildNodeAfter( prevChild, newChild );
        }
        else
        {
            parent.InsertChildNodeAfter( _curLastChild, newChild );
            _curLastChild = newChild;
        }
    }