Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
防止Select Xml转换特殊字符_Xml_Powershell - Fatal编程技术网

防止Select Xml转换特殊字符

防止Select Xml转换特殊字符,xml,powershell,Xml,Powershell,我有一个XML文件,在如下字段中包含一些特殊字符: <elem> <inelem>..</inelem> <inelem>&#13;</inelem> </elem> 输出在最后转换的字段中具有特殊字符,是否有方法防止转换 $xml = New-Object System.Xml.XmlDocument $xml.Load($file) $xml.elem.inelem.InnerText = "..." $x

我有一个XML文件,在如下字段中包含一些特殊字符:

<elem>
 <inelem>..</inelem>
 <inelem>&#13;</inelem>
</elem>
输出在最后转换的字段中具有特殊字符,是否有方法防止转换

$xml = New-Object System.Xml.XmlDocument
$xml.Load($file)
$xml.elem.inelem.InnerText = "..."
$xml.Save($file)