我的XML文件中包含以下元素:
<Applications>
<Application>Base Operations</Application>
<Application>Development Screen</Application>
<Application>eStat</Application>
<Application>EStat Rate Quote Poller</Application>
<Application>ETA Alert Agent</Application>
<Application>File Maintenance</Application>
<Application>Fuel Optimization Agent</Application>
<Application>FuelSourcingModule</Application>
<Application>Operations Reporting</Application>
<Application>Order Entry</Application>
<Application>PB GP Stand Alone</Application>
<Application>PB Rating Engine</Application>
<Application>PS Scheduler</Application>
<Application>Reports</Application>
<Application>Settlements</Application>
<Application>System Administration</Application>
<Application>TMW Backoffice</Application>
<Application>TMW CRM Right</Application>
<Application>TMW Operations</Application>
</Applications>
如何将每个转换为如下所示的列表:Base Operations, Development Screen, eStat, etc.
?
答案 0 :(得分:1)
这个怎么样?
[XML]$xml = @"
<Applications>
<Application>Base Operations</Application>
<Application>Development Screen</Application>
<Application>eStat</Application>
<Application>EStat Rate Quote Poller</Application>
<Application>ETA Alert Agent</Application>
<Application>File Maintenance</Application>
<Application>Fuel Optimization Agent</Application>
<Application>FuelSourcingModule</Application>
<Application>Operations Reporting</Application>
<Application>Order Entry</Application>
<Application>PB GP Stand Alone</Application>
<Application>PB Rating Engine</Application>
<Application>PS Scheduler</Application>
<Application>Reports</Application>
<Application>Settlements</Application>
<Application>System Administration</Application>
<Application>TMW Backoffice</Application>
<Application>TMW CRM Right</Application>
<Application>TMW Operations</Application>
</Applications>
"@
[String]::Join(",",$xml.Applications.Application)