Converting XElement into XmlNode

前端 未结 6 1489
逝去的感伤
逝去的感伤 2021-02-12 06:56

I know there is no direct method of doing it but still.. Can we convert XElement element into XmlNode. Options like InnerText and

6条回答
  •  [愿得一人]
    2021-02-12 07:22

    I think the shortest way is following:

    Dim xn as XmlNode = xdoc.ReadNode(xElem.CreateReader)
    

    That's all! Convert to C# is trivial.

提交回复
热议问题