When putting raw XML in a LANSA field, XML syntax is lost when outputting XML
|Date:||26 July, 2007|
|Product/Release:||LANSA Integrator V11.3|
|Abstract:||The XSL parser is converting the data from < and > to < and >|
|Submitted By:||LANSA Technical Support|
Putting raw XML in a field which needs to go into the XSL. However, when it outputs the data into the final XML, the result is undesired.
Note how the < and > characters are changed to < and > respectively.
<?xml version="1.0" encoding="UTF-8"?>
The output field had <Employee><Number>A1001</Number><Name>BEN JONES</Name></Employee>
The XSL parser is converting the data from < and > to < and >.
Depending on how you are generating the XML, the two solutions are:
- If you are using style-sheets:
When using XSL, add the disable-output-escaping attribute to the xsl:value-of directive
LANSA function field
CHANGE FIELD(#CITY) TO('<greatcity>Sydney</greatcity>')
<City><xsl:value-of disable-output-escaping="yes" select="/rdml:function/rdml:fields/rdml:field[@name='CITY']/@value"/></City>
- If you are using XMLBindwizard, then you will need to select
'Disable output escaping':
Refer to Figure 1. below.