0
私はvb.netからXMLファイルに書きます。サンプルはこのように見えます。XML子ノードの問題を読む
<?xml version="1.0" encoding="utf-8"?>
<Settings>
<LaunchOnReboot>True</LaunchOnReboot>
<SavedMounts>
<Mount>
<Description>fake mount</Description>
<DriveLetter>B</DriveLetter>
<DriveLocation>\\Location\1</DriveLocation>
<UserName>User</UserName>
<Password>FakePassword2</Password>
<AutomagicallyMount>False</AutomagicallyMount>
<Linux>True</Linux>
</Mount>
<Mount>
<Description>fake mount 2</Description>
<DriveLetter>G</DriveLetter>
<DriveLocation>\\fake\fakelocation</DriveLocation>
<UserName>awiles</UserName>
<Password>FakePassword</Password>
<AutomagicallyMount>False</AutomagicallyMount>
<Linux>True</Linux>
</Mount>
</SavedMounts>
</Settings>
私はそれを書いても問題はありませんが、私はSavedMounts子ノードを読む際に問題があります。これは私がこれまで行ってきたことですが、特定のElementStringsに基づいて特定の値を引き出す方法がわかりません。
これはコードのように見えますが、少し助けが必要だと思います。
だけでなく、あなただけ表示される文字列。 XMLから値を表示するつもりですが、まずそれを読む必要があります。 –