I want to use dash symbol in xml node name but when i try to get that node it says something about unexpected token.
Try quoting the name that has dashes in it:
PS > $xml = [xml]'text' PS > $xml.root.'dash-it-all'