473,322 Members | 1,714 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,322 software developers and data experts.

Replacing HTML charcters with entity equivalents

Hi,
Is anyone aware of a built-in method to substitute HTML or XML reserved
characters with their escaped equivalents?
If I have the String "If X < Y then hello" I have to substitute the '<' in
order to encode it into a serialized XML string.
What is the 'correct' way in .NET?

Cheers,
iGadget
Nov 22 '05 #1
1 1350
HttpUtility.HtmlEncode()

At least on web services and the like.
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"iGadget" <iG******@hotmail.com> wrote in message
news:1f*******************************@40tude.net. ..
Hi,
Is anyone aware of a built-in method to substitute HTML or XML reserved
characters with their escaped equivalents?
If I have the String "If X < Y then hello" I have to substitute the '<' in
order to encode it into a serialized XML string.
What is the 'correct' way in .NET?

Cheers,
iGadget

Nov 22 '05 #2

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

Similar topics

11
by: yawnmoth | last post by:
say i have a for loop that would iterate through every character and put a space between every 80th one, in effect forcing word wrap to occur. this can be implemented easily using a regular...
10
by: Xah Lee | last post by:
i have a bunch of java files that has spaced-out formatting that i want to get rid of. I want to replace two end of line characters by one end of line characters. The files in question is unix, and...
6
by: Horst Gutmann | last post by:
Hi :-) I currently have quite a big problem with minidom and special chars (for example &uuml;) in HTML. Let's say I have following input file:...
1
by: iGadget | last post by:
Hi, Is anyone aware of a built-in method to substitute HTML or XML reserved characters with their escaped equivalents? If I have the String "If X < Y then hello" I have to substitute the '<' in...
54
by: Howard Kaikow | last post by:
Where is the official documentation of what constitutes a minimally compliant HTML file? -- http://www.standards.com/; See Howard Kaikow's web site.
8
by: Mike | last post by:
Hi, I am using Python to scrape web pages and I do not have problem unless I run into a site that is utf-8. It seems & is changed to &amp; when the site is utf-8. If I try to replace it with...
4
by: Darrel | last post by:
How does HTML.encode work? I'm trying to save text in a hidden form field into a SQL DB. The tedt is HTML (from a WYSIWYG editor...X-standard). One problem I have is that stray apostrophe's in...
35
by: jacob navia | last post by:
Hi guys! I like C because is fun. So, I wrote this function for the lcc-win32 standard library: strrepl. I thought that with so many "C heads" around, maybe we could improve it in a...
1
by: basavaraj koti | last post by:
I need to show image using xslt Below provided in my xml and xslt. <?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl" href="../xyz.xsl"?> <Grade class="03"...
2
by: John Smith | last post by:
Hi, I coded a python script that lets me parse a csv file into html code with a certain format, but I would like to replace every "<" and ">" character that appears within each column entry of...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.