大家好,我有这个 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>