如何停止从参考Windows特定的XML单位在我的非Windows项目的IDE?我的、单位、项目、Windows

2023-09-07 23:04:51 作者:酒味病态怪女

我要创建在Delphi XE5一个Android程序处理XML文件的工作。我用 TXMLDocument的

I want to create a Android program in Delphi XE5 to work with XML files. I use TXMLDocument.

我不能编译并运行它,但是,因为德尔福多次增加 Xml.Win.msxmldom 使用部分。出现以下错误:

I can't compile and run it, though, because Delphi repeatedly adds Xml.Win.msxmldom in the uses section. The following error occurs:

[DCC致命错误] Unit1.pas(11):F1026找不到文件:   C:\用户\哈米德\文档\的RAD Studio \项目\ Xml.Win.msxmldom.dcu   (单位范围Xml.Win表示的Win32,Win64的只)

[DCC Fatal Error] Unit1.pas(11): F1026 File not found: 'C:\Users\HamiD\Documents\RAD Studio\Projects\Xml.Win.msxmldom.dcu' (unit scope "Xml.Win" indicates Win32, Win64 only)

我如何避免使用单位在我的项目?

How do I avoid using that unit in my project?

推荐答案

TXMLDocument的,修改DOM从 MSXML 到 ADOMXML V4 ,停止需要使用 MSXML 单元。

In the TXMLDocument, change the DOM vendor from MSXML to ADOMXML v4, to stop the need to use the MSXML unit.

这是包含在文档中的 TXMLDocument.DOMVendor 。虽然特别提到苹果,同样适用于iOS和Android的其他FireMonkey应用程序。

This is covered in the documentation for TXMLDocument.DOMVendor. Although it mentions specifically Mac, the same applies to other FireMonkey applications on iOS and Android.

提示:如果您正在设计的目的是在Mac OS X上运行一个应用程序FireMonkey,那么你应该执行以下步骤以确保编译成功:

Tip: If you are designing a FireMonkey application that is intended to run on Mac OS X, then you should perform the following steps to ensure that the compilation succeeds:

更改DOMVendor从MSXML到ADOM XML V4。

Change DOMVendor from MSXML to ADOM XML v4.

如果该Xml.Win.msxmldom单位是在uses子句,然后将其删除。

If the Xml.Win.msxmldom unit is in the uses clause then remove it.

编译的Mac OS X应用程序

Compile your application for Mac OS X.

该文档是在 XE5版本修改为而不是:

The documentation was modified in the XE5 version to read instead:

提示:在Mac OS X或移动应用程序使用TXMLDocument的,在Object Inspector,下降这个组件到窗体设计器后DOMVendor属性ADOM XML v4的正确设置。否则,TXMLDocument的组件不再可用的iOS /安卓/ OSX的应用程序。

Windows 10企业版镜像现已开放下载

Tip: To use TXMLDocument in Mac OS X or Mobile applications, in the Object Inspector, set the DOMVendor property to ADOM XML v4 right after dropping this component onto the Form Designer. Otherwise, the TXMLDocument component is no longer usable for iOS/Android/OSX applications.