小编haa*_*ram的帖子

使用powershell解析xml

我是PowerShell的新手.我有一个配置XML,读作为 -

<xml>
    <Section name="BackendStatus">
        <BEName BE="crust" Status="1" />
        <BEName BE="pizza" Status="1" />
        <BEName BE="pie" Status="1" />
        <BEName BE="bread" Status="1" />
        <BEName BE="Kulcha" Status="1" />
        <BEName BE="kulfi" Status="1" />
        <BEName BE="cheese" Status="1" />
    </Section>
</xml>
Run Code Online (Sandbox Code Playgroud)

我需要解析每个元素BEName以检查状态.如何使用PowerShell完成此操作?

powershell

29
推荐指数
3
解决办法
8万
查看次数

标签 统计

powershell ×1