Xml阅读我该怎么做 [英] Xml read how can I do it
本文介绍了Xml阅读我该怎么做的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在阅读Xml
Xml结构如下所示
但是我必须找到它的位置
因为有名字
< information>
< person>
< student>
< name> michael< / name>
< surname> jackson< / surname>
< / student>
< teacher>
< name> bon< / name>
< surname> jovi< surname>
< / teacher>
< / person>
< lessons>
< name> physics< / name>
< hour> 10< / hour>
< / lessons>
< / information>
我尝试过:
我该怎么办
感谢您的帮助
解决方案
一个选项是使用 XmlDocument
class。 MSDN提供代码示例 [ ^ ]
hi,
I am reading Xml
The Xml structure looks like the following
but I have to find where it is
because there are "name"
<information> <person> <student> <name>michael</name> <surname>jackson</surname> </student> <teacher> <name>bon</name> <surname>jovi<surname> </teacher> </person> <lessons> <name>physics</name> <hour>10</hour> </lessons> </information>
What I have tried:
how can I do it
Thanks for your help
解决方案
An option is using the XmlDocument
class. MSDN provides code samples[^].
这篇关于Xml阅读我该怎么做的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文