XmlNode Value vs InnerText

后端 未结 5 2039
梦毁少年i
梦毁少年i 2020-12-08 18:03

I\'m creating a ping application for school with an XML full of URLs. I lost an hour because of XmlNode.Value was resulting in a null.

Then I changed i

5条回答
  •  眼角桃花
    2020-12-08 18:55

    Regarding to MSDN, Value property of XmlNodeType.Element returns:

    null. You can use the XmlElement.InnerText or XmlElement.InnerXml properties to access the value of the element node.

提交回复
热议问题