selectSingleNode przy użyciu vbscript

Poniżej znajduje się struktura mojego pliku xml:

<configuration>
  <appSettings>
    <add key="ProductVersion" value="5.5.5"/>
    <add key="LogsDirectory" value="e:\\Logs"/>
  </appSettings>
<configuration>

Próbuję uzyskać następujący kod, aby uzyskać wartość 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)

Ale daje błąd, ponieważ obiekt jest wymagany.

Każda pomoc wysoko ceniona.

Dzięki

questionAnswers(1)

yourAnswerToTheQuestion