[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CDATA
Thanks Scott...I'll check my CCSIDs.
- Michael
On Mon, Feb 25, 2008 at 12:59 PM, Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:
> You say you're URL encoding the data, then you say the vendor requires
> CDATA. I'm a bit confused.... URL encoding is for data that's to be
> placed in a URL, or uploaded as if it's a form from a browser. CDATA is
> an XML thing. So I guess I'm kinda lost.
>
> At any rate, adding CDATA should be a matter of coding something like this:
>
> data = '<xmltag><![CDATA[' + yourData + ']]>';
>
> If the brackets aren't translating properly, it means you have your
> CCSIDs set incorrectly. If the CCSIDs (set with HTTP_setCCSIDs) are set
> properly, the brackets should translate to the correct characters on the
> other end.
>
> I can't see writing a MakeCDATA routine... it'd be almost more difficult
> to use than coding it directly, and certainly would require more
> overhead. I could see having a general XML escape routine to convert
> characters like & into &, however.
>
>
>
>
> Michael Ryan wrote:
> > I have a routine where I send email addresses using HTTPAPI. I'm url
> > encoding the data, but I'm having a problem with an email address like
> > One&Two@xxxxxxxxxxx The ampersand is causing a problem, and the
> > vendor's documentation calls for CTDATA for the ampersand. However,
> > the brackets aren't translating correctly. I have the program in
> > debug, and here's what I'm seeing: Instead of [, I get Ý, and instead
> > of ], I get "...so my CDATA[&]] looks like this: !ÝCDATAÝ&¨¨.
> >
> > Two questions: Is there a MakeCDATA type function in HTTPAPI? And,
> > what do I need to do to handle the translation of the brackets?
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------