Get nodes from xml files

前端 未结 3 501
失恋的感觉
失恋的感觉 2020-12-06 13:23

How to parse the xml file?


 
<         


        
3条回答
  •  再見小時候
    2020-12-06 13:51

    Sitemap has 2 sub nodes "loc" and "lastmod". The nodes that you are accessing are "name" and "url". that is why you are not getting any result. Also in your XML file the last sitemap tag is not closed properly with a corresponding Kindly try xn["loc"].InnerText and see if you get the desired result.

提交回复
热议问题