Processing ProcessParameters as XML in SQL Server.

0

Please login or register to vote for this query.

(click on this box to dismiss)

Music Fans Meta

Q&A about the site for music historians, critics, and fans

;WITH XMLNAMESPACES('http://schemas.microsoft.com/winfx/2006/xaml' AS mtbwa)
, tbl_BuildDefinition(ProcessParameters) AS (
    SELECT '<Dictionary x:TypeArguments="x:String, x:Object" xmlns="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">   <mtbwa:BuildSettings x:Key="BuildSettings" ProjectsToBuild="$/Projects/BpABA/Dev/V6/DUnit/FrameworkTests.dproj">     <mtbwa:BuildSettings.PlatformConfigurations>       <mtbwa:PlatformConfigurationList Capacity="1">         <mtbwa:PlatformConfiguration Configuration="Debug" Platform="Win32" />       </mtbwa:PlatformConfigurationList>     </mtbwa:BuildSettings.PlatformConfigurations>   </mtbwa:BuildSettings>   <mtbwa:SourceAndSymbolServerSettings SymbolStorePath="{x:Null}" x:Key="SourceAndSymbolServerSettings" />   <mtbwa:AgentSettings x:Key="AgentSettings" MaxExecutionTime="01:00:00" MaxWaitTime="04:00:00" Tags="Delphi 5" />   <x:Boolean x:Key="CreateWorkItem">False</x:Boolean>   <x:Boolean x:Key="PerformTestImpactAnalysis">False</x:Boolean> </Dictionary>' UNION ALL
    SELECT '<Dictionary x:TypeArguments="x:String, x:Object" xmlns="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">   <mtbwa:BuildSettings x:Key="BuildSettings" ProjectsToBuild="$/Projects/BpABA/Dev/Project/BpABA.dproj">     <mtbwa:BuildSettings.PlatformConfigurations>       <mtbwa:PlatformConfigurationList Capacity="1">         <mtbwa:PlatformConfiguration Configuration="Debug" Platform="Win32" />       </mtbwa:PlatformConfigurationList>     </mtbwa:BuildSettings.PlatformConfigurations>   </mtbwa:BuildSettings>   <mtbwa:SourceAndSymbolServerSettings SymbolStorePath="{x:Null}" x:Key="SourceAndSymbolServerSettings" />   <mtbwa:AgentSettings x:Key="AgentSettings" MaxExecutionTime="01:00:00" MaxWaitTime="04:00:00" Tags="Delphi 5" />   <x:Boolean x:Key="CreateWorkItem">False</x:Boolean> <x:Boolean x:Key="PerformTestImpactAnalysis">False</x:Boolean> </Dictionary>' UNION ALL
    SELECT '<Dictionary x:TypeArguments="x:String, x:Object" xmlns="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">   <mtbwa:BuildSettings x:Key="BuildSettings" ProjectsToBuild="$/Projects/BpABA/Main/V6/DUnit/FrameworkTests.dproj">     <mtbwa:BuildSettings.PlatformConfigurations>       <mtbwa:PlatformConfigurationList Capacity="1">         <mtbwa:PlatformConfiguration Configuration="Debug" Platform="Win32" />       </mtbwa:PlatformConfigurationList>     </mtbwa:BuildSettings.PlatformConfigurations>   </mtbwa:BuildSettings>   <mtbwa:SourceAndSymbolServerSettings SymbolStorePath="{x:Null}" x:Key="SourceAndSymbolServerSettings" />   <mtbwa:AgentSettings x:Key="AgentSettings" MaxExecutionTime="01:00:00" MaxWaitTime="04:00:00" Tags="Delphi 5" />   <x:Boolean x:Key="CreateWorkItem">False</x:Boolean>   <x:Boolean x:Key="PerformTestImpactAnalysis">False</x:Boolean> </Dictionary>' UNION ALL
    SELECT '<Dictionary x:TypeArguments="x:String, x:Object" xmlns="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">   <mtbwa:BuildSettings x:Key="BuildSettings" ProjectsToBuild="$/Projects/BpABA/Main/Project/BPABA.dproj,$/Projects/BpABA/Main/Project/dunit/BpABATests.dproj">     <mtbwa:BuildSettings.PlatformConfigurations>       <mtbwa:PlatformConfigurationList Capacity="1">         <mtbwa:PlatformConfiguration Configuration="Debug" Platform="Win32" />       </mtbwa:PlatformConfigurationList>     </mtbwa:BuildSettings.PlatformConfigurations>   </mtbwa:BuildSettings>   <mtbwa:SourceAndSymbolServerSettings SymbolStorePath="{x:Null}" x:Key="SourceAndSymbolServerSettings" />   <mtbwa:AgentSettings x:Key="AgentSettings" MaxExecutionTime="01:00:00" MaxWaitTime="04:00:00" Tags="Delphi 5" />   <x:Boolean x:Key="CreateWorkItem">False</x:Boolean>   <x:Boolean x:Key="PerformTestImpactAnalysis">False</x:Boolean>   <x:Boolean x:Key="RunDUnitTests">False</x:Boolean> </Dictionary>' UNION ALL
    SELECT '<Dictionary x:TypeArguments="x:String, x:Object" xmlns="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">   <mtbwa:BuildSettings x:Key="BuildSettings" ProjectsToBuild="$/Projects/BpABA/Main/V6/DUnit/FrameworkTests.dproj">     <mtbwa:BuildSettings.PlatformConfigurations>       <mtbwa:PlatformConfigurationList Capacity="1">         <mtbwa:PlatformConfiguration Configuration="Debug" Platform="Win32" />       </mtbwa:PlatformConfigurationList>     </mtbwa:BuildSettings.PlatformConfigurations>   </mtbwa:BuildSettings>   <mtbwa:SourceAndSymbolServerSettings SymbolStorePath="{x:Null}" x:Key="SourceAndSymbolServerSettings" />   <mtbwa:AgentSettings x:Key="AgentSettings" MaxExecutionTime="01:00:00" MaxWaitTime="04:00:00" Tags="Delphi 5" />   <x:Boolean x:Key="CreateWorkItem">False</x:Boolean>   <x:Boolean x:Key="PerformTestImpactAnalysis">False</x:Boolean> </Dictionary>' UNION ALL
    SELECT '<Dictionary x:TypeArguments="x:String, x:Object" xmlns="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">   <mtbwa:BuildSettings x:Key="BuildSettings" ProjectsToBuild="$/Projects/BpABA/Main/Project/BPABA.dproj,$/Projects/BpABA/Main/Project/dunit/BpABATests.dproj">     <mtbwa:BuildSettings.PlatformConfigurations>       <mtbwa:PlatformConfigurationList Capacity="1">         <mtbwa:PlatformConfiguration Configuration="Debug" Platform="Win32" />       </mtbwa:PlatformConfigurationList>     </mtbwa:BuildSettings.PlatformConfigurations>   </mtbwa:BuildSettings>   <mtbwa:SourceAndSymbolServerSettings SymbolStorePath="{x:Null}" x:Key="SourceAndSymbolServerSettings" />   <mtbwa:AgentSettings x:Key="AgentSettings" MaxExecutionTime="01:00:00" MaxWaitTime="04:00:00" Tags="Delphi 5" />   <x:Boolean x:Key="CreateWorkItem">False</x:Boolean>   <x:Boolean x:Key="PerformTestImpactAnalysis">False</x:Boolean>   <x:Boolean x:Key="RunDUnitTests">False</x:Boolean> </Dictionary>' UNION ALL
    SELECT '<Dictionary x:TypeArguments="x:String, x:Object" xmlns="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">   <mtbwa:BuildSettings x:Key="BuildSettings" ProjectsToBuild="$/Projects/BpABA/Release/V6/DUnit/FrameworkTests.dproj">     <mtbwa:BuildSettings.PlatformConfigurations>       <mtbwa:PlatformConfigurationList Capacity="1">         <mtbwa:PlatformConfiguration Configuration="Release" Platform="Win32" />       </mtbwa:PlatformConfigurationList>     </mtbwa:BuildSettings.PlatformConfigurations>   </mtbwa:BuildSettings>   <mtbwa:SourceAndSymbolServerSettings SymbolStorePath="{x:Null}" x:Key="SourceAndSymbolServerSettings" />   <mtbwa:AgentSettings x:Key="AgentSettings" MaxExecutionTime="01:00:00" MaxWaitTime="04:00:00" Tags="Delphi 5" />   <x:Boolean x:Key="CreateWorkItem">False</x:Boolean>   <x:Boolean x:Key="PerformTestImpactAnalysis">False</x:Boolean> </Dictionary>' UNION ALL
    SELECT '<Dictionary x:TypeArguments="x:String, x:Object" xmlns="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">   <mtbwa:BuildSettings x:Key="BuildSettings" ProjectsToBuild="$/Projects/BpABA/Release/Project/BpABA.dproj">     <mtbwa:BuildSettings.PlatformConfigurations>       <mtbwa:PlatformConfigurationList Capacity="1">         <mtbwa:PlatformConfiguration Configuration="Release" Platform="Win32" />       </mtbwa:PlatformConfigurationList>     </mtbwa:BuildSettings.PlatformConfigurations>   </mtbwa:BuildSettings>   <mtbwa:SourceAndSymbolServerSettings SymbolStorePath="{x:Null}" x:Key="SourceAndSymbolServerSettings" />   <mtbwa:AgentSettings x:Key="AgentSettings" MaxExecutionTime="01:00:00" MaxWaitTime="04:00:00" Tags="Delphi 5" />   <x:Boolean x:Key="CreateWorkItem">False</x:Boolean> <x:Boolean x:Key="PerformTestImpactAnalysis">False</x:Boolean> </Dictionary>' UNION ALL
    SELECT '<Dictionary x:TypeArguments="x:String, x:Object" xmlns="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">   <mtbwa:BuildSettings x:Key="BuildSettings" ProjectsToBuild="$/Projects/BpAccsi/Dev/V7/DUnit/Frameworktests.dproj,$/Projects/BpAccsi/Dev/V7/DUnit/CopyToBinaries.dproj">     <mtbwa:BuildSettings.PlatformConfigurations>       <mtbwa:PlatformConfigurationList Capacity="1">         <mtbwa:PlatformConfiguration Configuration="Debug" Platform="Win32" />       </mtbwa:PlatformConfigurationList>     </mtbwa:BuildSettings.PlatformConfigurations>   </mtbwa:BuildSettings>   <mtbwa:SourceAndSymbolServerSettings SymbolStorePath="{x:Null}" x:Key="SourceAndSymbolServerSettings" />   <mtbwa:AgentSettings x:Key="AgentSettings" MaxExecutionTime="01:00:00" MaxWaitTime="04:00:00" Tags="Delphi XE" />   <x:Boolean x:Key="CreateWorkItem">False</x:Boolean>   <x:String x:Key="MSBuildArguments">/p:DCC_Define="CONSOLE_TESTRUNNER;FRAMEWORK_VERSIE_6;COMPILE_TEST;DEBUG;madExcept"</x:String>   <x:Boolean x:Key="PerformTestImpactAnalysis">False</x:Boolean> </Dictionary>' UNION ALL
    SELECT '<Dictionary x:TypeArguments="x:String, x:Object" xmlns="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">   <mtbwa:BuildSettings x:Key="BuildSettings" ProjectsToBuild="$/Projects/BpAccsi/Dev/Project/AccsiV3.dproj,$/Projects/BpAccsi/Dev/Project/dunit/AccsiV3Tests.dproj,$/Projects/BpAccsi/Dev/Project/dunit/CopyToBinaries.dproj">     <mtbwa:BuildSettings.PlatformConfigurations>       <mtbwa:PlatformConfigurationList Capacity="1">         <mtbwa:PlatformConfiguration Configuration="Debug" Platform="Win32" />       </mtbwa:PlatformConfigurationList>     </mtbwa:BuildSettings.PlatformConfigurations>   </mtbwa:BuildSettings>   <mtbwa:SourceAndSymbolServerSettings SymbolStorePath="{x:Null}" x:Key="SourceAndSymbolServerSettings" />   <mtbwa:AgentSettings x:Key="AgentSettings" MaxExecutionTime="01:00:00" MaxWaitTime="04:00:00" Tags="Delphi XE" />   <x:Boolean x:Key="CreateWorkItem">False</x:Boolean>   <x:String x:Key="MSBuildArguments">/p:DCC_Define="CONSOLE_TESTRUNNER;FRAMEWORK_VERSIE_6;COMPILE_TEST;DEBUG;madExcept"</x:String>   <x:Boolean x:Key="PerformTestImpactAnalysis">False</x:Boolean> </Dictionary>'
)
, q AS (
  SELECT  CAST(bd.ProcessParameters AS XML) p
  FROM    tbl_BuildDefinition bd     
) 
SELECT  X.Doc.value('mtbwa:BuildSettings[0]', 'VARCHAR(50)') AS 'Test'
FROM    q CROSS APPLY p.nodes('/mtbwa:Dictionary') AS X(Doc)

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results