【发布时间】:2013-03-22 11:09:16
【问题描述】:
大家好,我有这个 xml 文档,我想提取第一个或第二个应用程序文件路径和文件名等。我试过了
DocumentElement.SelectSingleNode("/InstallerList/Installer/File_Path").InnerText
但我只得到第一个应用程序信息,从来没有第二个,我试着玩弄
DocumentElement.SelectNodes("//Installer")
并在其末尾添加一个整数,以便我可以循环浏览,但它似乎不喜欢那样。有什么想法吗?
<?xml version="1.0" encoding="utf-8"?>
<InstallerList>
<Installer Name="First Application">
<FilePath>C:\</FilePath>
<Third_Parameter>etc</Third_Parameter>
<Forth_Parameter>etc</Forth_Parameter>
</Installer>
<Installer Name="Second Application">
<FilePath>etc</FilePath>
<Third_Parameter>etc</Third_Parameter>
<Forth_Parameter>etc</Forth_Parameter>
</Installer>
</InstallerList>
【问题讨论】:
标签: xml vb.net xmldocument