XML & the ampersand

Posted on 2006-05-11
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
    LVL 60

    Expert Comment

    by:Geert Bormans
    Hi jjfbuy,

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

    LVL 60

    Accepted Solution

    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>



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Javascript: Crash Course

    Javascript is not only emerging as the most important language to know, it's flexibility is unique. With Javascript being deployed on the web, mobile and even the desktop this is the one language that all technologists need to know.

    Suggested Solutions

    Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
    I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now