XML WRITER - ATTRIBUTES
SCENARIO
This describes how one or more attributes can be written to an Xml Document.
SOLUTION
- Create the following field in a Map transform (obviously the field could come from your source data).
In this example a second field called Fld2 is created with a static value of "AttributeValue2".
- The following assumes that two or more attributes need to be written to the same node. In a real world example the Field XPath may include multiple nodes e.g. "NodeName/NestedNode/....".
- In the Attribute property specify the name that you wish the attribute to be.
- Repeat this for the other node(s). Notice the same value is used in the XPath property for both fields; but the Attribute is changed.
- When the data is refreshed a single node with two attributes will be created.