[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: reserved character in XML element value
You could try using the http_EscapeXml procedure in httpapi.....works with
strings up to 4k...
Jim Bostwick
Reliable Credit Association, Inc
(503) 462-3049
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
Sent: Tuesday, June 05, 2012 10:00 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Ftpapi Digest, Vol 72, Issue 4
Send Ftpapi mailing list submissions to
ftpapi@xxxxxxxxxxxxxxxxxxxxxx
To subscribe or unsubscribe via the World Wide Web, visit
http://www.scottklement.com/mailman/listinfo/ftpapi
or, via email, send a message with subject or body 'help' to
ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
You can reach the person managing the list at
ftpapi-owner@xxxxxxxxxxxxxxxxxxxxxx
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Ftpapi digest..."
Today's Topics:
1. reserved character in XML element value (David Baugh)
2. RE: reserved character in XML element value (Mike Krebs)
3. RE: reserved character in XML element value (David Baugh)
4. Re: reserved character in XML element value (Scott Klement)
5. Re: reserved character in XML element value (TC)
----------------------------------------------------------------------
Message: 1
Date: Mon, 4 Jun 2012 11:52:54 -0700
From: David Baugh <davidb@xxxxxxxxxxxxxx>
Subject: reserved character in XML element value
To: "ftpapi@xxxxxxxxxxxxxxxxxxxxxx" <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Message-ID:
<29C125F733BC634FAB4D87647B948F294875352A30@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
et>
Content-Type: text/plain; charset="us-ascii"
Hello,
I have a data item on file that I'm inserting into an element before posting
it in a request. In this particular case, the data contains a '&' which is
causing server's parser to error out. I do have it wrapped in <![CDATA[
...]]>. Obviously I'm misunderstanding this, since I thought occurrences of
such would be accepted if inside this wrapper.
Otherwise, am I correct in assuming that I'd need to search and replace any
occurrences of this with & before assignment?
Thanks,
David
-------------- next part --------------
Hello,
I have a data item on file that I'm inserting into an element before
posting it in a request. In this particular case, the data contains a
`&' which is causing server's parser to error out. I do have it
wrapped in <![CDATA[ ...]]>. Obviously I'm misunderstanding this,
since I thought occurrences of such would be accepted if inside this
wrapper.
Otherwise, am I correct in assuming that I'd need to search and replace
any occurrences of this with & before assignment?
Thanks,
David
------------------------------
Message: 2
Date: Mon, 4 Jun 2012 15:35:29 -0500
From: Mike Krebs <mkrebs@xxxxxxxxxxxxxxxxxx>
Subject: RE: reserved character in XML element value
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <3DF08BA25872B644A1421B9F085B182991295BCD50@xxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
I believe you are right (if contained in a CDATA section there is no need to
escape &), but lest we get too far off subject, please ask this question on
midrange.com or similar.
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of David Baugh
Sent: Monday, June 04, 2012 1:53 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: reserved character in XML element value
Hello,
I have a data item on file that I'm inserting into an element before posting
it in a request. In this particular case, the data contains a '&' which is
causing server's parser to error out. I do have it wrapped in <![CDATA[
...]]>. Obviously I'm misunderstanding this, since I thought occurrences of
such would be accepted if inside this wrapper.
Otherwise, am I correct in assuming that I'd need to search and replace any
occurrences of this with & before assignment?
Thanks,
David
------------------------------
Message: 3
Date: Mon, 4 Jun 2012 14:39:38 -0700
From: David Baugh <davidb@xxxxxxxxxxxxxx>
Subject: RE: reserved character in XML element value
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Message-ID:
<29C125F733BC634FAB4D87647B948F294875352B15@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
et>
Content-Type: text/plain; charset="us-ascii"
Thanks Mike,
OK I can see your point. My routine is largely based in httpapi-land,
however there's an argument for digression. I sent it to
rpg400-l@xxxxxxxxxxxxx
Regarding your point about not needing the escape, it is inside the wrapper
but I get a parser error (confusing).
I'd welcome any further insight over on the other forum...
Thanks so much.
David
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mike Krebs
Sent: Monday, June 04, 2012 1:35 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: reserved character in XML element value
I believe you are right (if contained in a CDATA section there is no need to
escape &), but lest we get too far off subject, please ask this question on
midrange.com or similar.
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of David Baugh
Sent: Monday, June 04, 2012 1:53 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: reserved character in XML element value
Hello,
I have a data item on file that I'm inserting into an element before posting
it in a request. In this particular case, the data contains a '&' which is
causing server's parser to error out. I do have it wrapped in <![CDATA[
...]]>. Obviously I'm misunderstanding this, since I thought occurrences of
such would be accepted if inside this wrapper.
Otherwise, am I correct in assuming that I'd need to search and replace any
occurrences of this with & before assignment?
Thanks,
David
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
------------------------------
Message: 4
Date: Mon, 04 Jun 2012 19:43:43 -0400
From: Scott Klement <sk@xxxxxxxxxxxxxxxx>
Subject: Re: reserved character in XML element value
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Message-ID: <4FCD482F.2020103@xxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi David,
You're right, you should not have to escape the & character if it's
within a <![CDATA[ wrapper.
Unfortunately, not every XML parser supports CDATA (especially the very
early ones) and if the server is using a home-grown XML interpreter,
then all bets are off.
Converting from & to & should work anywhere/everywhere. You should
also change < to <, and > to >. There are a few others that are
recommended (though not necessarily required) as well.
On 6/4/2012 2:52 PM, David Baugh wrote:
> Hello,
>
>
> I have a data item on file that I'm inserting into an element before
> posting it in a request. In this particular case, the data contains a
> `&' which is causing server's parser to error out. I do have it
> wrapped in<![CDATA[ ...]]>. Obviously I'm misunderstanding this,
> since I thought occurrences of such would be accepted if inside this
> wrapper.
>
>
> Otherwise, am I correct in assuming that I'd need to search and
replace
> any occurrences of this with& before assignment?
>
>
> Thanks,
>
>
> David
>
------------------------------
Message: 5
Date: Mon, 4 Jun 2012 15:46:12 -0400
From: "TC" <tcrook57@xxxxxxxxx>
Subject: Re: reserved character in XML element value
To: "HTTPAPI and FTPAPI Projects" <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <E213C1FA48764C0E9369DDD36E454DEF@TCrookPC>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=original
Hi David,
I just went through this with setting up several XML applications on my
clients systems. You have to replace it with the &. There are several
characters along with the & that are "illegal" in XML, they are <, >, ', and
".
I just did a routine in my XML document creation programs to replace the &
with the + sign and passed that instead as my client wanted to retain the &
in their name and address fields.
Hope this helps,
T Crook
-----Original Message-----
From: David Baugh
Sent: Monday, June 04, 2012 2:52 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: reserved character in XML element value
Hello,
I have a data item on file that I'm inserting into an element before posting
it in a request. In this particular case, the data contains a '&' which is
causing server's parser to error out. I do have it wrapped in <![CDATA[
...]]>. Obviously I'm misunderstanding this, since I thought occurrences of
such would be accepted if inside this wrapper.
Otherwise, am I correct in assuming that I'd need to search and replace any
occurrences of this with & before assignment?
Thanks,
David
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list digest. To unsubscribe, go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
End of Ftpapi Digest, Vol 72, Issue 4
*************************************
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------