XML & the ampersand

Posted on 2006-05-11
Medium Priority
Last Modified: 2013-11-19
One of the links I'd like use in my rss.xml file includes an &, which XML doesn't like.  How can I have a link like this:


Or, is it impossible?
Question by:jjfbuy
  • 2
LVL 60

Expert Comment

by:Geert Bormans
ID: 16665062
Hi jjfbuy,


ampersands need to be escaped,
or put in a CDATA section

LVL 60

Accepted Solution

Geert Bormans earned 2000 total points
ID: 16665072
in XML
& should become &
< should become &lt;
> should become &gt; in some occasions
" should become &quot; in " enclosed atribute values
' should become &apos; in ' enclosed atribute values

CDATA sections are like this
    <test> <![CDATA[this is the content of the section, no problem with &]]> </test>



Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question