Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

XML: recursive searching

$
0
0

Hello,

I am trying to follow Dr. Weltner's examples in the PowerTips "XML Related Tasks". I am able to search the XML sibling nodes but there are child nodes that I need to recurse into. I am not XML-savvy and this is beyond me.

I would like to print the DisplayName and Duration of each task in the giant TFS build logs (ActivityLog.AgentScope.99.xml) . The siblings however have children nodes:

I would like to get a summary from these monstrous XML files of the task and the duration:

<Children><BuildInformationNode Id="4b9e98c7-497a-4884-b61b-b09a2c16406c" ParentId="92a41e04-a4a5-4b2e-b217-ecd9382a5ff0" Type="ActivityTracking">
  <Fields>
    <InformationField Name="ActivityInstanceId" Value="87212" />
    <InformationField Name="ActivityType" Value="Sequence" />
    <InformationField Name="DisplayName" Value="Compile, Test and Publish" />
    <InformationField Name="Duration" Value="00:13:43" />

Then I can create a summary report of how long each task took.

Thanks,
Dave


Viewing all articles
Browse latest Browse all 6937

Trending Articles