ChiakiYu.Common.Extensions.LinqToXmlExtensions.ToXElement C# (CSharp) 메소드

ToXElement() 공개 정적인 메소드

将XmlNode转换为XElement
public static ToXElement ( this node ) : System.Xml.Linq.XElement
node this
리턴 System.Xml.Linq.XElement
        public static XElement ToXElement(this XmlNode node)
        {
            var xdoc = new XDocument();
            using (var xmlWriter = xdoc.CreateWriter())
            {
                node.WriteTo(xmlWriter);
            }
            return xdoc.Root;
        }
LinqToXmlExtensions