Focal Point
[CLOSED] Ampersands in XML output format

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5597023206

April 18, 2011, 05:14 AM
Wep5622
[CLOSED] Ampersands in XML output format
I have a launch page that uses the below code in an embedded procedure:
TABLE FILE rp_rm_dw_project
SUM FST.RP_RM_DW_PROJECT.RP_RM_DW_PROJECT.PRJID
 BY RP_RM_DW_PROJECT.RP_RM_DW_PROJECT.PRJNAME
WHERE PRJNAME LIKE '_.%';
ON TABLE PCHOLD FORMAT XML
END


Unfortunately, the contents of PRJNAME sometimes contain ampersands (&), which in the generated XML are copied verbatim instead of being turned into an XML entity (& amp; ). For example:
<td colnum="c0">4. R&D Program</td>


The net effect is that (in Internet Explorer) entries in my dropdown are cut off before the ampersand!

Although I have to admit that it's stupid of IE to interpret non-entities as entities, that ampersand probably should have been escaped in the XML already.

So, I have a few questions:

This message has been edited. Last edited by: Kerry,


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
April 18, 2011, 05:19 AM
FrankDutch
You can try to replace the & value in the fields of your database.

Create a defined field NEW_PRJNAME with the same size and use a formula to replace the & for an other character (+)




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7