468,457 Members | 1,765 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,457 developers. It's quick & easy.

XML problem with url value &F&

gg
I specify the Url element as
<xsd:element name="Url">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="512"/>
<xsd:pattern value="http://[a-zA-z.\\_\-]+"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
in the xsd but When I use the following in the xml

<Url>https://www.xyz.com/cgi-bin/access/a...&F21=IB&F22=IB
&REQUEST=ClientSignin&LANGUAGE=ENGLISH</Url>
I got the error message
The reference to entity "F7" must end with the ';' delimiter. [17]
so I tried surrounding the url with double quote, then tried \ before &f7
but no luck. even \\&f7 did not help

tried google on a number of search terms but no luck so far
Mar 24 '07 #1
3 4200
In article <PFgNh.8212$__3.1414@edtnps90>, gg <gg@Edm.noMail.netwrote:
>I specify the Url element as
<xsd:element name="Url">
.... it's nothing to do with the schema.
>in the xsd but When I use the following in the xml

<Url>https://www.xyz.com/cgi-bin/access/a...&F21=IB&F22=IB
&REQUEST=ClientSignin&LANGUAGE=ENGLISH</Url>
You can't do that in XML. You have to replace your ampersands with
"&amp;".

-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Mar 24 '07 #2
gg
thank you. I just have to remember replacing & with &amp;.
"Richard Tobin" <ri*****@cogsci.ed.ac.ukwrote in message
news:eu***********@pc-news.cogsci.ed.ac.uk...
In article <PFgNh.8212$__3.1414@edtnps90>, gg <gg@Edm.noMail.netwrote:
I specify the Url element as
<xsd:element name="Url">

... it's nothing to do with the schema.
in the xsd but When I use the following in the xml

<Url>https://www.xyz.com/cgi-bin/access/a...B&F21=IB&F22=I
B
&REQUEST=ClientSignin&LANGUAGE=ENGLISH</Url>

You can't do that in XML. You have to replace your ampersands with
"&amp;".

-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.

Mar 24 '07 #3
in message <PFgNh.8212$__3.1414@edtnps90>, gg ('g*@Edm.noMail.net') wrote:
I specify the Url element as
<xsd:element name="Url">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="512"/>
<xsd:pattern value="http://[a-zA-z.\\_\-]+"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
in the xsd but When I use the following in the xml

<Url>https://www.xyz.com/cgi-bin/access/a...&F21=IB&F22=IB
&REQUEST=ClientSignin&LANGUAGE=ENGLISH</Url>
I got the error message
The reference to entity "F7" must end with the ';' delimiter. [17]
so I tried surrounding the url with double quote, then tried \ before
&f7 but no luck. even \\&f7 did not help
The (traditional) use of ampersand as a parameter-value pair separator in
URLs is a mistake. Many (but not all) dynamic content toolkits allow the
use of other characters, for example semi-colon, which do not provoke this
problem. However, if you must use ampersand, the correct way of writing
ampersand in an XML document is '&amp;'. So you will find that

<Url>https://www.xyz.com/cgi-bin/access/a...=IB&amp;F22=IB
&amp;REQUEST=ClientSignin&amp;LANGUAGE=ENGLISH</Url>

will work.

--
si***@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/

;; 'I think we should trust our president in every decision
;; that he makes and we should just support that'
;; Britney Spears of George W Bush, CNN 04:09:03

Mar 25 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Eric Zechman via .NET 247 | last post: by
21 posts views Thread by siliconwafer | last post: by
2 posts views Thread by Amit | last post: by
4 posts views Thread by Tom Fields | last post: by
2 posts views Thread by Jerim | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.