Click to See Complete Forum and Search --> : problem with the "&" sign


pokpoki
February 11th, 2003, 04:46 AM
Hi all,
i have this script :

<Send>
<URL>https://192.116.241.189/cgi-bin/cgimain</URL>
<PostData>&</PostData>
<TargetName>"g"</TargetName>
</Send>

and i'm trying to read the XML file from visual basic
and i'm getting error because of the "&" sign in the
<PostData> tag.

what should i do to fix it ?


P.S
when i put some other string in the <PostData> tag
it works fine.

antares686
February 11th, 2003, 05:17 AM
Many times it has to do with the control sign effect. Try passing

&amp;

and see what happens. When it gets to the other side it should be read as the value & and not the potential control sign.

mje
February 11th, 2003, 01:07 PM
'&' is an illegal xml character, since it is used to signify an entity. Instead, replace it with it's respective entity, &amp;amp;.