Code Comments
Programming Forum and web based access to our favorite programming groups.In COBOL, I am generating an XML from a COBOL copybook by the use of the 'XML GENERATE' statement. I find the following problem when I use special characters. When I have a special character say, & in a field in the second potition, the XML generated looks fine and has covnerted & to the correct escape sequence in the output XML. But when I have the '&' as the first character of a field, the XML generated is junk. Anyone any ideas how I could solve this. This is a critical issue in my Project and any comments would be really helpful.
Post Follow-up to this messageDid you see/read [url]http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3lr30/6.2.41.2.1[/ur l] "Any remaining instances of the five characters & (ampersand), ' (apostrophe ), > (greater-than sign), < (less-than sign), and " (quotation mark) are converte d into the equivalent XML references '&', ''', '>', '<', and '"', respectively. " If you are using IBM Enterprise COBOL V3.4 and the compiler is NOT working t his way, then you should report it to IBM support. (You don't tell us what comp iler you are using, so this was just a GUESS given the references to XML and GENERATE) -- Bill Klein wmklein <at> ix.netcom.com "shabi" <shabinaz@gmail.com> wrote in message news:1139992211.180474.249570@g47g2000cwa.googlegroups.com... > In COBOL, I am generating an XML from a COBOL copybook by the use of > the 'XML GENERATE' statement. I find the following problem when I use > special characters. > When I have a special character say, & in a field in the second > potition, the XML generated looks fine and has covnerted & to the > correct escape sequence in the output XML. But when I have the '&' as > the first character of a field, the XML generated is junk. > Anyone any ideas how I could solve this. This is a critical issue in my > Project and any comments would be really helpful. >
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.