× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Ann,

I was wondering if anyone could see where I am going wrong. I have thought
about scanning and replacing the 5 known characters that cause this
error. For example replace & with & works. But I was hoping to convert
the text to UNICODE and that solve the problem. Thanks for any ideas.


It won't solve the problem because the ampersand has special significance in
XML tags, even if you are Unicode. As others mentioned, the choices are to
use CTDATA or to encode it as & instead. You would also have trouble if
any field contents included the less than character. There are other
characters which are recommended to substitute as well, such as greater
than, but technically the ones which I believe interfere with XML parsing
are the ampersand and less than symbol.

One easy way to perform the substitution is to install the CGIDEV2 library
from IBM. Among other things, it includes a service program called
CGISRVPGM2 which includes procedure Encode() which does this very task for
you. It has a host of other useful stuff too. See http://easy400.net for
more information.

Doug

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.