Microsoft.SqlServer.XMLTask The namespace contains the interfaces and classes used for the XML Task, which is used to work with XML data. Using this task, a package can retrieve XML documents stored in files, apply operations to the documents using XSL Transformations, (XSLT) style sheets, and XPath expressions, merge multiple documents, and validate, compare, and save the updated documents to files and variables. Specifies which algorithm to use when comparing XML documents. Default. Chooses the comparison algorithm for you depending on the size and assumed number of changes in the compared documents. Compares the two XML documents by traversing the XML tree and comparing it node-by-node. This algorithm is very fast but may produce less precise results. For example, it may detect both an add and remove operation on a node instead of a move operation. Compares files based on an algorithm for finding the editing distance between trees, also known as Zhang-Shasha algorithm. This algorithm gives very precise results but it may be very slow on large XML documents with many changes. When the has an set to , then this enumeration is used to sets the options that affect the behavior of the comparison, as well as the resulting XDL DiffGram. The enumerations used will determine what items are included for consideration during the comparison. Specifies that the order of child nodes of each element is ignored. When this option is selected, two nodes with the same value that differ only by their position among sibling child nodes are treated as the same nodes. Specifies that Comment nodes are not compared. Specifies that document type declaration (DTD) is not compared. Specifies that the namespace Uniform Resource Identifiers (URIs) of the element and attribute names are not compared. This option also implies that the name prefixes are ignored. Specifies that the namespace URIs of the element and attribute names are not compared. This option also implies that the name prefixes are ignored. Specifies that the prefixes of element and attribute names are not compared. When this option is selected, two names that have the same local name and namespace URI, but have a different prefix, are treated as the same names. Specifies that significant white spaces are not compared and that all text nodes are normalized by discarding any leading and trailing white space characters (#x9, #x10, #x13, #x20) and replacing sequences of white space characters with a single space (#x20) character. Specifies that the XML declaration is not compared. Specifies that that none of the options found in the enumeration are used. Specifies the operations used when working with XML documents. Compares two XML documents. By using the source XML document as a base document, the Diff operation compares it to another XML document, detects the differences, and then writes the differences to an XML DiffGram document. This operation includes properties for customizing the comparison. Merges two XML documents. By using the source XML document as a base document, it merges a second document into the base document. The operation can specify a merge location in the document. Applies the output from the Diff operation (a DiffGram document) to an XML document to create a new parent document that can include content from the DiffGram document. Validates the XML document against a document type definition (DTD) or XML Schema definition (XSD). Performs XPath queries and evaluations. Performs XSL transformations on XML documents. Describes the location where the results are saved. This enumeration is used to set the property. Depending on value, the property must be compatible. For example, if the destination type is set to , then the destination property must provide a variable to save the results into. When the destination type is set to , then the property must provide a file connection manager. Specifies that results are saved to the file listed in the connection manager string. Specifies that the results are saved in a variable. Describes the location of the , the source type of the XPath string in , and the type of the second operand in . Depending on what the type is used, the , , and properties must be compatible. For example, if the is set to , then the must contain a connection manager. If the is , then the must point to the variable to use. Specifies that the XML document is entered in plain text, directly into an area in the task user interface. This option is used only when a user interface for the task is provided. Specifies that the XML document is saved in a file. The task interacts with the connection manager to retrieve XML documents from the files. If you are writing a user interface for this task, operations that support file connection manager retrieval should also offer a New connection button, which allows users to create a new connection while editing the task. Specifies that the XML document is saved in a variable. Specifies the type of validation that the operation uses. This enumeration is only used when the is . The default is an XML Schema, which is a value of XSD. Specifies that the validating parser is to retrieve the document type definition (DTD) and ensure that the document conforms to the grammar that the DTD describes. Default. Specifies that the document is validated by using the XML Schema validation services. Determines what type of XPATH functionality is performed. This enumeration is used by the . This enumeration value is used when you need to take advantage of XPATH functions such as sum(). This enumeration value is used when you want a node list returned that contains all of the nodes as an XML fragment. This enumeration value is used when you want the inner text value of all the nodes concatenated into a string. It also offers support for the text() function. Contains the members used to run several XML tasks, depending on the property, which is a value from the enumeration. This class cannot be inherited. Initializes a new instance of the class. Passes a 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. The breakpoint manager specific for this task. Runs the task. A that indicates the outcome of the execution. A collection for the task. A object for locking variables. An interface to raise events. An interface. The transaction object that the task is part of. This value can be null. Initializes the properties associated with this task. This method is called by the runtime and is not used in code. A collection of used by the task. A object for locking variables. An object that implements the interface. An object that implements the interface. A collection that contains the events to be raised during execution of the task. A collection of log entries. An object reference tracker. This method is not callable by your application code. To load a package saved as .xml, use the method. The XmlElement that contains the information to load. An object that implements the interface for raising events during persistence. Resumes execution of the task after pausing. The task or container is resumed by the runtime engine. This method is not callable by your application code. To save a package as .xml, use the method. The XML document to which to save the information. An object that implements the interface for firing events (errors, warnings, and so on) during persistence. Indicates that the executable needs to suspend. This method is called by the runtime engine. Verifies that the component is properly configured. A value from the enumeration. A collection of used by the task. A object for locking variables. An object that implements the interface. An object that implements the interface. A Boolean that indicates if a task should check if any breakpoints are enabled. true indicates that the task checks for enabled breakpoints. Gets or sets the name of the connection or the variable to which the XML task saves the results of the operation. A String that contains the name of the connection or variable to which the XML task saves the results of the operation. Gets or sets a enumeration value that indicates the type of destination to which the XML task saves the XML document. A value from the enumeration that indicates the type of destination to which the XML task saves the XML document. Gets or sets the comparison algorithm to use when the is . A value from the enumeration that indicates the comparison algorithm. Gets or sets the name of the connection or the variable to which the XML task saves the DiffGram document. A String that indicates the name of the connection or variable to which the XML task saves the DiffGram document. Gets or sets a value that indicates the type of destination to which the XML task saves the DiffGram document. A value from the enumeration that indicates the type of destination to which the XML task saves the DiffGram document. Gets or sets a value that indicates the options the operation uses when comparing documents. A value from the enumeration that indicates the options the operation uses when comparing documents. Returns the result of the task execution. A user-defined object. Gets or sets a Boolean that indicates whether the task fails if the XML document fails to validate according to the validation schema. true if the task fails if the XML document fails to validate according to the validation schema; false if XML validation does not affect task success. Gets or sets a Boolean that indicates whether the operation fails when a validation fails. A Boolean that indicates whether the operation fails when a validation fails. Gets an ArrayList class that contains a collection of nodes that the XPath operation produces. An ArrayList class that contains a collection of nodes that the XPath operation produces. Gets or sets a enumeration value that indicates the type of the operation that the task performs, such as validation or merging. A value from the enumeration that indicates the type of the operation that the task performs. Gets or sets a Boolean that indicates whether the operation overwrites existing destination files. true if the operation overwrites existing destination files. Gets or sets a Boolean that indicates whether the operation places the result in one node. true if the operation places the result in one node. Gets or sets a Boolean that indicates whether the comparison result, a DiffGram document, is saved. true if the comparison result, a DiffGram document, is saved. Gets or sets a Boolean that indicates whether the XML task saves the Diff operation output. true if the XML task saves the Diff operation output. 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. A String that contains the name of the connection, the variable, or the user-provided text that is the second operand. 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 . A value from the enumeration that indicates the type of source that contains the data in the second operand. Gets or sets the name of the connection, the variable, or the user-provided text that is the source the operation uses. A String that contains the name of the connection, the variable, or the user-provided text that is the source the operation uses. Gets or sets a value from the enumeration that indicates the type of source that contains the XML document the operation uses. A value from the enumeration that indicates the type of source that contains the XML document the operation uses. 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. true if that the task suspends. Gets or sets a enumeration value that indicates the type of validation the operation uses. A value from the enumeration that indicates the type of validation the operation uses. Gets or sets a enumeration value that indicates the XPath operation to perform. A value from the enumeration that indicates the XPath operation to perform. Gets or sets the source of the XPath expression. A String that contains the source of the XPath expression. Gets or sets a value from the enumeration that indicates the type of the source that contains the XPath expression in the property. A value from the enumeration that indicates the type of the source that contains the XPath expression.