我正在尝试将XML验证添加到现有的Powershell脚本中。我已经用C#编写代码作为概念证明,但是当我移植到Powershell并使用相同的输入文件时,我得到了不同的结果。我正在使用Powershell3.0。我正在使用的C#代码是:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Xml;usingSystem.Xml.Schema;namespaceSchemaTest{classProgram{conststringSCHEMA_PATH=@"C:\