以下は私のxmlファイルの構造です:
<configuration>
<appSettings>
<add key="ProductVersion" value="5.5.5"/>
<add key="LogsDirectory" value="e:\\Logs"/>
</appSettings>
<configuration>
LogsDirectory の値を取得するために、次のコードを試しています。
configurationFilePath = "e:\conf.xml"
Set xmlDoc = CreateObject("MSXML2.DomDocument.6.0")
xmlDoc.async = false
Call xmlDoc.load(configurationFilePath)
xpath1 = ".//configuration/appSettings/add[@key='LogsDirectory']/@value"
LogsDirectory = xmlDoc.selectSingleNode(xpath1)
しかし、それは必要なオブジェクトとしてエラーを出しています。
どんな助けでも大歓迎です。
ありがとう