查询一个简单的xml文件
我有一个包含两个主要类别的 xml 文件,可以说:
<A>
<B>
<element1>value</element1>
<element2>value</element2>
...
</B>
</A>
问题是我一直在尝试使用 Xlinq 读取它,但无法获取这些值。
我一直在这里寻找: http://www.hookedonlinq.com/LinqToXML5MinuteOVerview.ashx 此处:查询 XML 文件? 这里: http://www.java2s.com/Code/CSharp/ XML-LINQ/XDocument.htm 此处: http://www.developer.com/net/article.php/3840141/Converting-Data-to-XML-with-LINQ-to-XML.htm 以及 O'reilly Head First Csharp、Professional ASP.NET4 Csharp。
经过我所有的研究,我没有找到两种类似的方法来做同样的事情(这在多样性方面是好的),但现在我脑子里只有一堆固定的例子,没有什么通用的。没有参考库...那么,你们是在哪里学会使用 Xlinq 的呢?
谢谢
I have an xml file with two main categories, lets say:
<A>
<B>
<element1>value</element1>
<element2>value</element2>
...
</B>
</A>
The thing is that I've been trying to read it with Xlinq but I wasn't able to get those values.
I've been searching here:
http://www.hookedonlinq.com/LinqToXML5MinuteOVerview.ashx
here: Querying XML file?
here: http://www.java2s.com/Code/CSharp/XML-LINQ/XDocument.htm
here: http://www.developer.com/net/article.php/3840141/Converting-Data-to-XML-with-LINQ-to-XML.htm
And on O'reilly Head First Csharp, Professional ASP.NET4 Csharp.
After all my research I didn't find two similar ways to do the same thing (which is good in terms of variety), but now all I have in my mind is a bunch of fixed examples, nothing in general. No reference libraries...So, where did you guys learn to use Xlinq?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用这个:
Use this: