XML node rename–operator properties

The properties that you specify for the XML node rename operator include the XML column, the namespaces, and the qualified name for the node to be renamed.

General page

Label
Type a name for the highlighted operator on the data flow canvas.
Description
Type a description to record additional information about the highlighted operator. The description is optional.

Namespaces page

Namespaces

Type namespaces to be associated with the node to be renamed. A namespace contains a prefix and a Universal Resource Identifier (URI). Specify the URI in the format http://sample.org. When you specify a namespace without a prefix, the Design Studio uses this namespace as the default namespace. If there is more than one namespace without a prefix, then the data flow fails to run.

You can add or delete namespaces by clicking New instance button or Delete button. You can move selected namespaces up or down in the list by clicking Up arrow button or Down arrow button.

Rename page

XML column
Click the ellipsis button (...) to open the XML Column Selection window. Select the XML column that contains the node to be renamed from an input table.
XPath
Type the XPath expression that you want to run on the selected XML column. The XPath expression that you specify in this field defines the node that is renamed. The result of an XPath expression must be a node. For example, to rename an XML column that contains a city node, type the XPath expression city in the XPath field.
New name
Type a new qualified name for the node that is renamed.
Alternatively, you can specify an SQL expression. You create the expression by using the SQL Expression Builder. Click the ellipsis button (...) to open the SQL Expression Builder.
For example, suppose that a table that is named Customer contains data in the format shown in the following table.
Table 1. Customer table
Name City
Mary <city>Oshawa</city>
Rose <city>Toronto</city>
You can specify the SQL expression "Customer"."Name" in the New name field to rename the city node that is used in the City column. You can build the expression by clicking the Name column from the Customer table in the Inputs area of the SQL expression builder. In this case, the operator renames the city node of each row in the City column to the corresponding row value of the Name column. Therefore, the resulting table will be in the format shown in the following table.
Table 2. Resulting table
Name City
Mary <Mary>Oshawa</Mary>
Rose <Rose>Toronto</Rose>