System.Xml.XPath.XPathNavigator.InsertBefore C# (CSharp) 메소드

InsertBefore() 공개 메소드

public InsertBefore ( XmlReader newSibling ) : void
newSibling XmlReader
리턴 void
        public virtual void InsertBefore(XmlReader newSibling)
        {
            if (newSibling == null)
            {
                throw new ArgumentNullException(nameof(newSibling));
            }
            XmlWriter writer = InsertBefore();
            BuildSubtree(newSibling, writer);
            writer.Close();
        }

Same methods

XPathNavigator::InsertBefore ( ) : XmlWriter
XPathNavigator::InsertBefore ( XPathNavigator newSibling ) : void
XPathNavigator::InsertBefore ( string newSibling ) : void

Usage Example

예제 #1
0
        public virtual XmlWriter PrependChild()
        {
            XPathNavigator nav = Clone();

            if (nav.MoveToFirstChild())
            {
                return(nav.InsertBefore());
            }
            else
            {
                return(AppendChild());
            }
        }
All Usage Examples Of System.Xml.XPath.XPathNavigator::InsertBefore