• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 746
  • Last Modified:

XML & the ampersand

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:

http://www.someurl.com/index.php?c=111&z=bbb

Or, is it impossible?
0
jjfbuy
Asked:
jjfbuy
  • 2
1 Solution
 
Geert BormansInformation ArchitectCommented:
Hi jjfbuy,
http://www.someurl.com/index.php?c=111&z=bbb

http://www.someurl.com/index.php?c=111&z=bbb

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


Cheers!
0
 
Geert BormansInformation ArchitectCommented:
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>

cheers

Geert
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now