For Programmers: Free Programming Magazines  


Home > Archive > Cobol > February 2006 > xml generate error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author xml generate error
shabi

2006-02-15, 3:55 am

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.

William M. Klein

2006-02-15, 6:55 pm

Did you see/read

http://publibz.boulder.ibm.com/cgi-...lr30/6.2.41.2.1

"Any remaining instances of the five characters & (ampersand), ' (apostrophe), >
(greater-than sign), < (less-than sign), and " (quotation mark) are converted
into the equivalent XML references '&', ''', '&gt;', '&lt;', and
'"', respectively. "

If you are using IBM Enterprise COBOL V3.4 and the compiler is NOT working this
way, then you should report it to IBM support. (You don't tell us what compiler
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.
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com