ampersand (&) in URL stored in xml database

Help each other out

ampersand (&) in URL stored in xml database

Postby redondo_se on Thu May 12, 2005 7:39 am

Hi,

I've been using a really old version of Xlobby2 for about 1.5 years. Just decided to upgrade recently. Man, it's sweet.

Anyone know if I can save URLs with ampersands in a database? I understand that & is a special xml character, but I wonder if there's a workaround. I'm trying to store Yahoo Launchcast radio station URLs in a database. They are of the form:

http://blah.something.com/someapp.asp?a=4&b=3&c=2

I tried saving the ampersands as "%26" (ascii encoded) but that doesn't work. Internet explorer also doesn't like the "&" notation.

I guess if there's no way to do it, I could resort to storing each item between the &s as a separate item in the database. Could I then use the goto URL with a parameter like this:

http://blah.something.com/someapp.asp?a=%launchcast>a%&b=%launchcast>b% (etc.....)

Thanks,
Sean.
redondo_se
 
Posts: 16
Joined: Thu May 12, 2005 7:25 am

Postby tswhite70 on Wed May 18, 2005 8:00 pm

Internet Explorer 6 SP1 works fine with & notatation for me. Try saving the following in notepad and opening it up with IE.

?xml version="1.0"?>
<!DOCTYPE names [
<!ENTITY XXX999 "ç">
]>
<names>
<name>Franc&XXX999;ois &amp; Marcel</name>
</names>


The <!Entity ....> tag lets you set your own keycode for characters if you want, in this case the weird ç. Note the "ç" after XXX999 should be typed as the actual character reference which is the following with the _ removed "_&_#_231_;_" . See this website for more details...
http://www.xml.com/pub/a/2001/01/31/qanda.html

Hope it helps,
tsw
tswhite70
 
Posts: 318
Joined: Tue Jan 06, 2004 3:44 pm
Location: Houston, Tx

Postby redondo_se on Tue May 24, 2005 8:39 pm

Thanks for the info. I didn't have notification set for this thread, so I just noticed that you replied. I ended up just storing the values I need in the xml database, and then hardcoded the rest of the URL in the gotoURL.

Thanks,
Sean.
redondo_se
 
Posts: 16
Joined: Thu May 12, 2005 7:25 am