使用xmlDocument读取XML [英] Read XML using xmlDocument

查看:515
本文介绍了使用xmlDocument读取XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我有一个
这样的xml

Hi there,

I have a xml like

- <!-- SendRequest-->
- <x:Action xmlns:x="SignIn">
  <Value1>Nilai Pertama</Value1>
  <Value2>Nilai Kedua</Value2>
  </x:Action>



我该如何读取
的值 -操作=登录"
-Value1 ="Nilai Pertama"
-Value2 ="Nilai Kedua"

谢谢



How can i read the value of
- Action = "SignIn"
- Value1 = "Nilai Pertama"
- Value2 = "Nilai Kedua"

Thanks

推荐答案

尝试将其转换为XmlReader并从那里进行.

http://msdn.microsoft.com/en-us/library/system.xml. xmlreader.aspx [ ^ ]

http://msdn.microsoft.com/en-us/library/aa720470(VS .71).aspx [ ^ ]

祝你好运!
Try convert it to a XmlReader and go from there.

http://msdn.microsoft.com/en-us/library/system.xml.xmlreader.aspx[^]

http://msdn.microsoft.com/en-us/library/aa720470(VS.71).aspx[^]

Good luck!




您可以在本文和Xpath中找到读取XML的方法.在本文
Hi,

You can find the method for read a XML in this article and with Xpath in this article


我们可以通过以下方式读取XML
XMLReader
XMLTextReader
XPathNevigator
XMLDocument(DOM)

只需看以下链接将对您有帮助

此处是XML文档
We can read XML with following ways
XMLReader
XMLTextReader
XPathNevigator
XMLDocument (DOM)

Just see following Link will help u

Here is XML Document


这篇关于使用xmlDocument读取XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆