delphidelphi-2007delphi-xe4

Loading a Delphi XE4 project in older Delphi 2007 causes an error


I need to open a project written in Delphi XE4, but I have only Delphi 2007. When i try to open the project, I get this error:

Only one top level element is allowed in an XML document

enter image description here

I know the error is due to the project is wrote in a newer Delphi version. Is there any trick i could use to open it in an old version ?


Solution

  • An XML document is required to have exactly on root element. The error is informing you that your document does not adhere to that rule and is thus malformed. That seems a little odd because no version of Delphi writes out such malformed .dproj files. Perhaps the .dproj file has been corrupted in some way.

    The most expedient way to get around this issue is to remove the .dproj file and let the IDE regenerate one. From there you may need to apply settings that were previously set in the XE4 .dproj file, but you should at least be able to get started.