Problem with dash symbol in powershell

后端 未结 1 1673
别跟我提以往
别跟我提以往 2021-01-17 23:01

I want to use dash symbol in xml node name but when i try to get that node it says something about unexpected token.



        
1条回答
  •  走了就别回头了
    2021-01-17 23:31

    Try quoting the name that has dashes in it:

    PS > $xml = [xml]'text'
    PS > $xml.root.'dash-it-all'
    

    0 讨论(0)
提交回复
热议问题