Processing XML documents is a task we often need, especially when programming network services, such as updating RSS. The introduction of Linq To XML in. NET 3.5 greatly simplifies the reading and writing of XML documents, while the latest dynamic Features in. NET 4.0 will be simplified To the extreme. Take the "Top Ten" items for processing the White Cloud crane as an example. The data source address is http://www.byhh.net/posttop10.xml, and its content is as follows (to make the result clear, remove the link address field ):
<? Xml version = "1.0" encoding = "gb2312"?> <? Xml-stylesheet type = "text/xsl" href = "/style/blue/xsl/posttop. xsl"?> <Toppost> <post> <board> WorldSoccer </board> <title> what teams do you support? </Title> </post> <board> HUSTStudent </board> <title> earthquake ??? </Title> </post> <board> Picture </board> <title> if you want to become a mistress, you have a path! </Title> </post> <board> Picture </board> <title>... Don't be too picky </title> </post> <board> Humor </board> <title> [original] humor </title> </post> <post> <board> HUSTStudent </board> <title> an additional member's question </title> </post> <board> WorldSoccer </board> <title> slot, start pumping ?? </Title> </post> <board> WorldSoccer </board> <title> host MM haoliang </title> </post> <board> TrainFan </board> <title> 1000 </title> </post> <board> Movies </board> <title> we recommend that you use pandatv, 10 yuan in the morning. </title> </post> </toppost