共用方式為


XMLTask Class

Definition

Contains the members used to run several XML tasks, depending on the OperationType property, which is a value from the DTSXMLOperation enumeration. This class cannot be inherited.

public ref class XMLTask sealed : Microsoft::SqlServer::Dts::Runtime::Task, Microsoft::SqlServer::Dts::Runtime::IDTSBreakpointSite, Microsoft::SqlServer::Dts::Runtime::IDTSComponentPersist, Microsoft::SqlServer::Dts::Tasks::XMLTask::IDTSXMLTask
[Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.xmltask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.XMLTask.Localized), SamplesTag="SsisXmlTask", TaskContact="XML Task; Microsoft Corporation; SQL Server 2016; © 2015 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.XMLTaskUI.XMLTaskUI, Microsoft.SqlServer.XMLTaskUI, Version=13.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
[System.Runtime.InteropServices.Guid("BE19D629-EC49-455C-9708-27E3849F3C2A")]
public sealed class XMLTask : Microsoft.SqlServer.Dts.Runtime.Task, Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist, Microsoft.SqlServer.Dts.Tasks.XMLTask.IDTSXMLTask
[Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.xmltask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.XMLTask.Localized), SamplesTag="SsisXmlTask", TaskContact="XML Task; Microsoft Corporation; SQL Server 2017; © 2017 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.XMLTaskUI.XMLTaskUI, Microsoft.SqlServer.XMLTaskUI, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
[System.Runtime.InteropServices.Guid("935AC7BD-FEBE-4104-9E92-0D04136FFA27")]
public sealed class XMLTask : Microsoft.SqlServer.Dts.Runtime.Task, Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist, Microsoft.SqlServer.Dts.Tasks.XMLTask.IDTSXMLTask
[Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.xmltask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.XMLTask.Localized), SamplesTag="SsisXmlTask", TaskContact="XML Task; Microsoft Corporation; SQL Server 2019; © 2019 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.XMLTaskUI.XMLTaskUI, Microsoft.SqlServer.XMLTaskUI, Version=15.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
[System.Runtime.InteropServices.Guid("3A8B754B-0C03-4159-88DA-E3578D25A20B")]
public sealed class XMLTask : Microsoft.SqlServer.Dts.Runtime.Task, Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist, Microsoft.SqlServer.Dts.Tasks.XMLTask.IDTSXMLTask
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.xmltask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.XMLTask.Localized), SamplesTag="SsisXmlTask", TaskContact="XML Task; Microsoft Corporation; SQL Server 2016; © 2015 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.XMLTaskUI.XMLTaskUI, Microsoft.SqlServer.XMLTaskUI, Version=13.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
[<System.Runtime.InteropServices.Guid("BE19D629-EC49-455C-9708-27E3849F3C2A")>]
type XMLTask = class
    inherit Task
    interface IDTSXMLTask
    interface IDTSBreakpointSite
    interface IDTSSuspend
    interface IDTSComponentPersist
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.xmltask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.XMLTask.Localized), SamplesTag="SsisXmlTask", TaskContact="XML Task; Microsoft Corporation; SQL Server 2017; © 2017 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.XMLTaskUI.XMLTaskUI, Microsoft.SqlServer.XMLTaskUI, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
[<System.Runtime.InteropServices.Guid("935AC7BD-FEBE-4104-9E92-0D04136FFA27")>]
type XMLTask = class
    inherit Task
    interface IDTSXMLTask
    interface IDTSBreakpointSite
    interface IDTSSuspend
    interface IDTSComponentPersist
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.xmltask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.XMLTask.Localized), SamplesTag="SsisXmlTask", TaskContact="XML Task; Microsoft Corporation; SQL Server 2019; © 2019 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.XMLTaskUI.XMLTaskUI, Microsoft.SqlServer.XMLTaskUI, Version=15.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
[<System.Runtime.InteropServices.Guid("3A8B754B-0C03-4159-88DA-E3578D25A20B")>]
type XMLTask = class
    inherit Task
    interface IDTSXMLTask
    interface IDTSBreakpointSite
    interface IDTSSuspend
    interface IDTSComponentPersist
Public NotInheritable Class XMLTask
Inherits Task
Implements IDTSBreakpointSite, IDTSComponentPersist, IDTSXMLTask
Inheritance
Attributes
Implements

Remarks

For more information, see XML Task.

Constructors

XMLTask()

Initializes a new instance of the XMLTask class.

Properties

DebugMode

A Boolean that indicates if a task should check if any breakpoints are enabled.

Destination

Gets or sets the name of the connection or the variable to which the XML task saves the results of the operation.

DestinationType

Gets or sets a DTSXMLSaveResultTo enumeration value that indicates the type of destination to which the XML task saves the XML document.

DiffAlgorithm

Gets or sets the comparison algorithm to use when the OperationType is Diff.

DiffGramDestination

Gets or sets the name of the connection or the variable to which the XML task saves the DiffGram document.

DiffGramDestinationType

Gets or sets a value that indicates the type of destination to which the XML task saves the DiffGram document.

DiffOptions

Gets or sets a value that indicates the options the operation uses when comparing documents.

ExecutionValue

Returns the result of the task execution.

FailOnDifference

Gets or sets a Boolean that indicates whether the task fails if the XML document fails to validate according to the validation schema.

FailOnValidationFail

Gets or sets a Boolean that indicates whether the operation fails when a validation fails.

Namespaces

Gets or sets the collection of namespaces for the XML task.

NodeList

Gets an ArrayList class that contains a collection of nodes that the XPath operation produces.

OperationType

Gets or sets a DTSXMLOperation enumeration value that indicates the type of the operation that the task performs, such as validation or merging.

OverwriteDestination

Gets or sets a Boolean that indicates whether the operation overwrites existing destination files.

PutResultInOneNode

Gets or sets a Boolean that indicates whether the operation places the result in one node.

SaveDiffGram

Gets or sets a Boolean that indicates whether the comparison result, a DiffGram document, is saved.

SaveOperationResult

Gets or sets a Boolean that indicates whether the XML task saves the Diff operation output.

SecondOperand

Gets or sets the name of the connection, the variable, or the user-provided text that is the second operand in an operation that uses two operands. The second operand may be an XML document, a DiffGram, an XSLT, an XPath, or a validating document, depending on the operation.

SecondOperandType

Gets or sets a value that indicates the type of source that contains the XML document, the DiffGram, the XSLT, the XPath, or the validating document, found in the SecondOperand.

Source

Gets or sets the name of the connection, the variable, or the user-provided text that is the source the operation uses.

SourceType

Gets or sets a value from the DTSXMLSourceType enumeration that indicates the type of source that contains the XML document the operation uses.

SuspendRequired

Gets or sets a Boolean that indicates if tasks should suspend when they encounter a breakpoint. This value is set by the runtime engine for tasks and containers when a breakpoint is encountered.

TargetServerVersion (Inherited from Task)
ValidationDetails
ValidationType

Gets or sets a DTSXMLValidationType enumeration value that indicates the type of validation the operation uses.

Version

*** Member deprecated; see Remarks. ***   Returns the version of the task. This property is read-only.

(Inherited from Task)
XPathOperation

Gets or sets a DTSXMLXPathOperation enumeration value that indicates the XPath operation to perform.

XPathStringSource

Gets or sets the source of the XPath expression.

XPathStringSourceType

Gets or sets a value from the DTSXMLSourceType enumeration that indicates the type of the source that contains the XPath expression in the XPathStringSource property.

Methods

AcceptBreakpointManager(BreakpointManager)

Passes a BreakpointManager to a task. The task will use the breakpoint manager to create, remove, and check the status of breakpoints. This method is called by the runtime and is not used in code.

CanUpdate(String)

*** Member deprecated; see Remarks. ***   A Boolean that indicates whether the new package XML can update the old package XML.

(Inherited from Task)
Equals(Object)

Determines whether two object instances are equal.

(Inherited from DtsObject)
Execute(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging, Object)

Runs the task.

GetConnectionID(Connections, String)

Gets a String containing the ID of the connection.

(Inherited from Task)
GetConnectionName(Connections, String)

Gets a String containing the name of the connection.

(Inherited from Task)
GetHashCode()

Returns the hash code for this instance.

(Inherited from DtsObject)
InitializeTask(Connections, VariableDispenser, IDTSInfoEvents, IDTSLogging, EventInfos, LogEntryInfos, ObjectReferenceTracker)

Initializes the properties associated with this task. This method is called by the runtime and is not used in code.

LoadFromXML(XmlElement, IDTSInfoEvents)

This method is not callable by your application code. To load a package saved as .xml, use the LoadPackage(String, IDTSEvents) method.

ResumeExecution()

Resumes execution of the task after pausing. The task or container is resumed by the runtime engine.

SaveToXML(XmlDocument, IDTSInfoEvents)

This method is not callable by your application code. To save a package as .xml, use the SaveToXml(String, Package, IDTSEvents) method.

SuspendExecution()

Indicates that the executable needs to suspend. This method is called by the runtime engine.

Update(String)

*** Member deprecated; see Remarks. ***   This method updates the old package XML with the new package XML if CanUpdate(String) is set to true.

(Inherited from Task)
Validate(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging)

Verifies that the component is properly configured.

Applies to