One really needs to see the XML file which you are trying to process.
For a start there is an inconsistancy of usage in your code. You first refer to "Days" (initial capital the rest lower case) yet later you write "DAYS/MONDAY" (all capitals). XML is case sensitive and you must use the correct case on selection.
The next question is to whether "Days" is the top element. Since your line "Set Days = xmlDoc.documentElement.sel
Furthermore in your second posting you write :-
Set DayNodes = xmlDoc.SelectNode("/AgentS
which tends to suggest that AgentSettings is the top most element?
Main Topics
Browse All Topics





by: JenH2Posted on 2009-09-22 at 16:10:54ID: 25398509
Getting farther, but still running into problems. I got around the first error by changing:
ectSingleN ode("Days" )
e("*")
<code>
Set Days = xmlDoc.documentElement.sel
If Days = "Nothing" Then
State = "Default"
Else
State = "Custom"
End If
</code>
Changed to:
<code>
State = ""
Set NodeList = xmlDoc.getElementsByTagNam
For Each Elem in NodeList
If Elem.tagName = "Days" Then
State = "Custom"
End If
Next
</code>
So now I can tell if the <Days> node exists, but then I need to parse through each of the days and read the text from then into a variable that I can then use later to write (I'm echoing them for now, but will write the data to the registry later).
Select allOpen in new window