TransferStoredProceduresTask.LoadFromXML(XmlElement, IDTSInfoEvents) Method


此方法不能由应用程序代码调用。This method is not callable by your application code. 若要加载保存为 .xml 的包,请使用 LoadPackage(String, IDTSEvents) 方法。To load a package saved as .xml, use the LoadPackage(String, IDTSEvents) method.

 virtual void LoadFromXML(System::Xml::XmlElement ^ rootNode, Microsoft::SqlServer::Dts::Runtime::IDTSInfoEvents ^ events);
public void LoadFromXML (System.Xml.XmlElement rootNode, Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents events);
abstract member LoadFromXML : System.Xml.XmlElement * Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents -> unit
override this.LoadFromXML : System.Xml.XmlElement * Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents -> unit
Public Sub LoadFromXML (rootNode As XmlElement, events As IDTSInfoEvents)



包含要加载的信息的节点。The node that contains the information to be loaded.


一个对象,该对象实现在持久性期间中用于引发事件(错误、警告等)的 IDTSInfoEvents 接口。An object that implements the IDTSInfoEvents interface for raising events (errors, warnings, and so on) during persistence.



此方法是 LoadFromXML 可用的,因为它在创建自定义对象时继承的接口和 SSIS 运行时中交付的对象是公共的。This method, LoadFromXML, is available because it is public on an interface that you inherit when you are creating custom objects and by objects shipped in the SSIS runtime. 此方法仅适用于继承,不应在其他目的的代码中调用。This method is intended for inheritance only and should not be called from code for other purposes. 如果要创建自定义对象,并需要有关如何编写您自己的方法的信息 LoadFromXML ,请参阅使用自定义对象扩展包If you are creating a custom object and need information about how to write your own LoadFromXML method, see Extending Packages with Custom Objects.

如果要加载已保存为 XML 的包,请使用 Microsoft.SqlServer.Dts.Runtime.Application.LoadPackage 方法。If you want to load a package that has been saved as XML, use the Microsoft.SqlServer.Dts.Runtime.Application.LoadPackage method. 如果已将包保存到文件系统或 MSDB 数据库,请使用 Microsoft.SqlServer.Dts.Runtime.Application.LoadFromSqlServerMicrosoft.SqlServer.Dts.Runtime.Application.LoadFromDtsServer 方法。If the package has been saved to the File System or MSDB database, use the Microsoft.SqlServer.Dts.Runtime.Application.LoadFromSqlServer or Microsoft.SqlServer.Dts.Runtime.Application.LoadFromDtsServer methods.

调用上的任何加载方法时 Application ,运行时将循环访问由包包含的任务、连接管理器、日志提供程序和所有其他对象,并对 LoadFromXML 每个对象调用方法。When you call any of the loading methods on the Application, the runtime will iterate through the tasks, connection managers, log providers, and all other objects that are contained by the package and call the LoadFromXML method on each of them. 包含的对象在其中包含代码 LoadFromXML ,以分析对象必须重新创建的每个属性的 XmlElement 以及为元素保存的值。The contained objects have code in their LoadFromXML that parses the XmlElement for each property that the object must recreate, and the value saved for the element. 因此,您不会直接对 LoadFromXML 单独的对象调用,而是对对象调用方法 Application ,并且运行时将级联到包中,并 LoadFromXML 为您调用对象上的。Therefore, you do not directly call the LoadFromXML on the individual objects, but call the method on the Application object, and the runtime will cascade through the package and call the LoadFromXML on the objects for you.

Applies to