XML

XML and Special Characters

Posted on

I just learned the hard way when my IIS website crashed because  I used an ampersand “&” instead of the word “and” in a menu title.

</Item>
  <Item Category="Misc">
    <Option filename="/FAQ/DropBoxReg.pdf" title="How to get a Dropbox account" />
    <Option filename="/FAQ/AccessingDropbox.pdf" title="Setting up GSM & Personal Dropbox" />
    <Option filename="/FAQ/iClickerOverview.pdf" title="Using iClicker in GSM Classrooms" />
    <Option filename="/FAQ/Crestron.pdf" title="How to use the Crestron Air Media system" />

Can you spot it?

Yeah…I had a really long title for the document in the menu list so I thought I’d shorten it with an ampersand. I thought, “It’s between quotes…that ain’t no THANG!”

FAIL. After restarting the website, I received the bad news.

I found a good article on TechRepublic about the why and workarounds for this phenomenon Beware the Ampersand…. Enjoy. B$

Advertisements