Hello everyone,
I have an xml file which I need to loop through using vbscript. The
format looks like the following:
<?xml version="1.0" ?>
<hotfixes>
<Server>
<ServerName>Server1</ServerName>
<hotfix>KB819696</hotfix>
<hotfix>KB823182</hotfix>
<hotfix>KB823353</hotfix>
<hotfix>KB823559</hotfix>
<hotfix>KB824105</hotfix>
</Server>
<Server>
<ServerName>Server2</ServerName>
<hotfix>KB823182</hotfix>
<hotfix>KB823353</hotfix>
<hotfix>KB823559</hotfix>
<hotfix>KB824105</hotfix>
<hotfix>KB824141</hotfix>
</Server>
</hotfixes>
I am very familiar with vbscript but I don't know much in the way of
reading xml files. I am looking for some help to read this file. I
would need to store each servername for each server element, of which
there could be anywhere from 1-300. I also need to loop through the
hotfix nodes for each server element save the hotfix name with the
servername if it matches a certain string. Basically, I need to do the
following:
1. Loop through each server node.
2. Get the server name.
3. Loop through each hotfix element in the current server node and
save the name if it matches some text.
4. Save the servername and any hotfix names found for that server
node.
5. Move onto the next server node and repeat the process until the xml
file is complete.
If anyone could help me out with a script or some code to get me
started, it would be much appreciated.