Reading an XML File with .NET

前端 未结 2 396
不思量自难忘°
不思量自难忘° 2020-12-18 15:59

I am new to xml and unable to find a way to get content in between tags. My XML file is



  <         


        
2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-18 16:37

    You need to use an XML Query language. I would recommend LINQ to XML if you're using .Net 3.5 or XPath if you're using something earlier. XPath has the advantage of being an industry standard, but LINQ to XML is a much 'cleaner' API, in my opinion.

    How to query XML with an XPath expression by using Visual C# - Tutorial on using XPath

    LINQ to XML Video Tutorial

    MSDN XPath Examples - From the XPath Reference

    Location Paths - Includes text() function for example.

提交回复
热议问题