473,473 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 4438
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Luklrc | last post by:
Hi, I'm having to create a querysting with javascript. My problem is that javscript turns the "&" characher into "&amp;" when it gets used as a querystring in the url EG: ...
2
by: Eric Zechman via .NET 247 | last post by:
I have a project in which I get xml posted via a hidden form field (data=<xml></xml>). People are entering names like Bill & Sandy Smith. this is coming over as:...
21
by: siliconwafer | last post by:
Hi, In case of following expression: c = a && --b; if a is 0,b is not evaluated and c directly becomes 0. Does this mean that && operator is given a higher precedence over '--'operator? as...
1
by: Max | last post by:
hi i have stored my connction string in web.config as we do usually. code of web.confing is given below. check the password field contain "&" character. now when i run my application it gives...
2
by: Amit | last post by:
I have assigned a simple xml into a XmlReader. A switch case loops through the nodes and writes the data to XmlWriter object which is initialized to a xml file. The output xml file is correctly...
4
by: Scott | last post by:
In order to give a meaning average value and minimum and maximum values, I would like to have a formula for a group of data after taking out those extremes. Can someone share your way to...
4
by: Tom Fields | last post by:
Hello! I like to use the XmlTextWriter to write some SVG files. But in some cases, I need the '&' as '&' and not as &amp;. Example: <glyph unicode="&#x4c;"/> Some code-snippet:
2
by: Jerim | last post by:
Our database stores the & symbol as &amp; I have a select menu that queries the database based on the selection. A sample selection: <option value=\"Cats &amp; Dogs\">Cats & Dogs</option> After I...
6
by: avcitamer | last post by:
We upgraded our system and problem below occured, pleas help me... Windows 2003 server SP1 When I set a decimal DB field value to "123,32" (using ADODB.recordset ) updated value was ok (123.32)...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.