473,387 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

rss feed : escaped invalid xml chars display incorrectly in browser

I am using StringBuilder to build a string containing xml that is
Response.Write() to the browser as an rss feed.

To replace invalide xml chars, I am using code fragments such as

xmlDocument.Append("<description>");
xmlDocument.Append(SecurityElement.Escape(productD escription));
xmlDocument.Append("</description>");

The xml string I generate does validate as a valid rss feed at
http://validator.w3.org/feed/check.cgi

However, when displayed in the browser, the escaped chars are not translated
back to their original chars, so I get displayed text such as :

Here&apos;s a new fascinating and fun way to annoy your neighbor&apos;s dog.

May 4 '06 #1
1 1296


John A Grandy wrote:
I am using StringBuilder to build a string containing xml that is
Response.Write() to the browser as an rss feed.


Don't use StringBuilder to construct XML, use XmlTextWriter, see my
response to your earlier question.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
May 5 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ask josephsen | last post by:
Hi there Can anyone help me make my rss feed show characters like "ÆØÅæøå"? According to http://aggregator.userland.com/validator the feed is fine and it works fine in a dedicated reader. But...
4
by: Mark J. McGinty | last post by:
Greets, Part of the content of one of our web pages uses wingdings and Chr(239) through Chr(242) (which are little arrow outlines, though that's not really important.) It worked just fine in...
13
by: Oxns | last post by:
Hi, Can anyone point me at the class to convert a string so that it displays escaped chars as \r, \n etc. please Its done in the 2005 debugger so I hope its available as a class ??. Thanks...
0
by: Andy Lim | last post by:
Hi all, In my recent project, my client uses Chinese Star software to type the articles in chinese (using MS Word), and I need to display these articles within ASP.NET pages. And, for this very...
0
by: Andy Lim | last post by:
Hi all, In my recent project, my client uses Chinese Star software to type the articles in chinese (using MS Word), and I need to display these articles within ASP.NET pages. And, for this very...
0
by: Andy Lim | last post by:
Hi all, In my recent project, my client uses Chinese Star software to type the articles in chinese (using MS Word), and I need to display these articles within ASP.NET pages. And, for this very...
5
by: Ed Flecko | last post by:
Hi folks, I'm trying to figure out this whole RSS feed thing. I've created my .xml file to use for my feed, and my browsers "recognize" that I have an RSS feed, and you can subscribe, etc., etc....
8
by: Greg C. | last post by:
I tried tackling this problem about 6 months ago, but after going almost completely insane I gave up, since my news feed seemed to display just fine anyways. However, in an effort to have my feeds...
0
by: stefcollect | last post by:
Hi all, I am pretty new to PHP and am stuck on - what I think - is a generic string handling problem. I need to read and manipulate some HTML files and have a problem in getting some...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.