Be aware that, when copying an input message element to an output element, not only the value of the output element but also its type is set to that of the input element. This means that if, for example, you have an input XML document with an attribute, and you want to set a Field element (rather than an attribute) in your output message to the value of the input attribute, you have to include a TYPE clause cast to change the element-type from attribute to Field.
<Field01 Attrib01='Attrib01_Value'>Field01_Value</Field01>To create an output like:
<MyField_A MyAttrib_A='Attrib01_Value' MyAttrib_B='Field01_Value' > <MyField_B>Field01_Value</MyField_BC> <MyField_C>Attrib01_Value</MyField_C> </MyField_A'>You would use the following ESQL:
-- Create output attribute from input attribute SET OutputRoot.XMLNSC.MyField_A.MyAttrib_A = InputRoot.XMLNSC.Field01.Attrib01; -- Create output field from input field SET OutputRoot.XMLNSC.MyField_A.MyField_B = InputRoot.XMLNSC.Field01; -- Create output attribute from input field value, noting we have to -- "cast" back to an attribute element SET OutputRoot.XMLNSC.MyField_A.(XMLNSC.Attribute)MyAttrib_B = InputRoot.XMLNSC.Field01; -- Create output field from input attribute value, noting we have to -- "cast" back to a field element SET OutputRoot.XMLNSC.MyField_A.(XMLNSC.Field)MyField_C = InputRoot.XMLNSC.Field01.Attrib01;
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ac20425_ |