I was recently tasked with pulling some data from older XML files we inherited to populate our database with. In particular I wish to be able to parse the XML below in Autoit, get the value for "DataUploadCompleted", write that value to an INI file which can then be processed by our Systems Management tool and inserted into it's database. I cannot parse XML directly with the Systems Management tool so was hoping Autoit would be a quick solution.
Anyone able to give me some ideas on the best way to go about this... In the past the XML files I have parsed were all rather easy to locate the Xpath for and pull data from, but I can't figure out the best way to do so with the format of this one... Here's the XML code:
<?xml version="1.0"?> <Variables Version="0"> <Variable Name="DataUploadDays" Value="Sun,Mon,Tue,Wed,Thu,Fri,Sat"/> <Variable Name="DataUploadStart" Value="20"/> <Variable Name="DataUploadEnd" Value="21"/> <Variable Name="DataUploadRandom" Value="1/1/2011 0:00:00 AM"/> <Variable Name="DataUploadRandomSuccessWindow" Value="1,0"/> <Variable Name="DataUploadRandomFailedWindow" Value="1,0"/> <Variable Name="DataUploadStarted" Value="1/1/2011 0:00:00 AM"/> <Variable Name="DataUploadCompleted" Value="1/1/2011 0:00:00 AM"/> <Variable Name="DataUploadStatus" Value="Pending" Result="" DateTime="1/1/2011 0:00:00 AM"/> <Variable Name="DataDownloadDays" Value="Sun,Mon,Tue,Wed,Thu,Fri,Sat"/> <Variable Name="DataDownloadStart" Value="04"/> <Variable Name="DataDownloadEnd" Value="05"/> <Variable Name="DataDownloadRandom" Value="1/1/2011 0:00:00 AM"/> <Variable Name="DataDownloadRandomSuccessWindow" Value="1,0"/> <Variable Name="DataDownloadRandomFailedWindow" Value="1,0"/> <Variable Name="DataDownloadStarted" Value="1/1/2011 0:00:00 AM"/> <Variable Name="DataDownloadCompleted" Value="1/1/2011 0:00:00 AM"/> <Variable Name="DataDownloadStatus" Value="Pending" Result="" DateTime="1/1/2011 0:00:00 AM"/> </Variables>