Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/8.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
在Delphi XE4 IDE中打开pas文件时发生XML分析错误_Delphi_Delphi 7_Delphi Xe4 - Fatal编程技术网

在Delphi XE4 IDE中打开pas文件时发生XML分析错误

在Delphi XE4 IDE中打开pas文件时发生XML分析错误,delphi,delphi-7,delphi-xe4,Delphi,Delphi 7,Delphi Xe4,双击pas文件以在Delphi XE4 IDE中打开它时,出现以下错误: XML Parse Error: Reason: The system cannot locate the object specified 此文件在其uses子句中使用xmldom、XMLIntf、oxmldom、XMLDoc单位。我没有改变这个文件中的任何内容,在Delphi 7中打开时没有错误,但是在Delphi XE4中,当我双击.pas文件在IDE中打开它时,会抛出上面的错误。按OK后,.dfm文件打开。打开

双击pas文件以在Delphi XE4 IDE中打开它时,出现以下错误:

XML Parse Error: 
Reason: The system cannot locate the object specified

此文件在其uses子句中使用
xmldom、XMLIntf、oxmldom、XMLDoc
单位。我没有改变这个文件中的任何内容,在Delphi 7中打开时没有错误,但是在Delphi XE4中,当我双击
.pas
文件在IDE中打开它时,会抛出上面的错误。按OK后,
.dfm
文件打开。

打开.pas和.dfm文件不涉及XML解析。您的单元使用一些与XML相关的单元这一事实也不涉及在单元加载时解析XML


这听起来像是IDE在打开与源文件相关联的辅助文件时遇到了问题。而且,关于这个文件或它在源代码中的引用的某些内容在从XE4转换后没有幸存下来。查找与麻烦源单元具有相同干的文件,但扩展名不同。或者在引用辅助文件的源单元中查找IDE生成的
{…}
注释。这将有望引导您找到解决方案。

感谢您提供详细的答案。我发现pas文件中“xtr”文件的路径是硬编码的,我的机器上不存在该路径。给出“xtr”文件的正确路径解决了问题。