-4
我想知道如何通过下面的xml中的id解析特定的人?C#解析特定的xml
也可以说我想循环遍历它们并将它们添加到列表视图中,我如何使用XmlDocument做到这一点?
<users>
<user id="Marcus">
<website>www.google.com</website>
<type>1</type>
</user>
<user id="John">
<website>www.youtube.com</website>
<type>1</type>
</user>
<user id="Josh">
<website>www.google.com</website>
<type>2</type>
</user>
</users>
我会推荐的XElement/XNode/XLINQ(或任何它被称为)。我发现它比XmlDocument更容易。无论如何,这是有据可查的/ tutorial'ed ... – 2012-05-26 00:30:08
你打算使用什么API - XDocument,XmlDocument,XmlReader,XmlPathNavigator ??? – alexm