I will now check the XML for the usage of ApplicationC. After filtering all XML files with an IF statement I will grab the ModifiedDate from the first appearance of this entry, which is working
But what I also need is the following:
Search for appearance of ApplicationC > ok
Grab the ModifiedDate of first appearance > ok
Grab the ModifiedDate of the next ChangeHistoryItem after the first appearance of ApplicationC > not working
How can I jump to the next element in the list of ChangeHistoryItem elements?
Background: The ModifiedDate of the next element (no matter which App it is) minus the ModifiedDate of the first appearance of ApplicationC will provide the usage time of ApplicationC.
It may be over the top, but if I understand you correctly you want to extract each occurence of ‘ApplicationC’ with its ‘ModiefiedData’ together with the following element from the list, right? This could be an approach:
If you convert the ModifiedDate to DateTime objects you could calculate the timespan between the occurence of ‘ApplicationC’ and the following ApplicationName to determine the usage time.