更新时间:2023-11-24 23:50:46
假设您的 XML 结构类似于:
Assuming your XML structure is something similar to:
$xml = [xml]'
<Events>
<Event Definition="Validate" DLLPath="" DLLName="Helper.dll" DLLClass="HelpMain" DLLRoutine="pgFeatureInfoOnValidate_WriteToRegSelectedFeatures" InputParameters="pTreeViewFeatureTreeServerOS" RunOnce="no"/>
<Event Definition="Validate1" DLLPath="" DLLName="Helper.dll1" DLLClass="HelpMain1" DLLRoutine="pgFeatureInfoOnValidate_WriteToRegSelectedFeatures" InputParameters="pTreeViewFeatureTreeServerOS" RunOnce="no"/>
</Events>
'
#Or get it from a XML file
$xml = [xml](Get-Content $XMLPath)
$xml.Events.Event | Select DLLName