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

Storing HTML in XML

Hi All,

I am trying to store an HTML string within an XML node, using:
Node.InnerText = strContent

Problem is, the HTML ends up like this, when its in the XML:
<TextArea1>&amp;lt;b&amp;gt;me&amp;lt;/b&amp;gt;</TextArea1>

Any help will be much appreciated.

Simon.
--
--
* Please reply to group for the benefit of all
* Found the answer to your own question? Post it!
* Get a useful reply to one of your posts?...post an answer to another one
* Search first, post later : http://www.google.co.uk/groups
* Want my email address? Ask me in a post...Cos2MuchSpamMakesUFat!

--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 5607 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
Mar 19 '07 #1
4 1429
Server.HTMLDecode(xmlString)
"Simon Harris" <to***********@makes-you-fat.comwrote in message
news:uS**************@TK2MSFTNGP02.phx.gbl...
Hi All,

I am trying to store an HTML string within an XML node, using:
Node.InnerText = strContent

Problem is, the HTML ends up like this, when its in the XML:
<TextArea1>&amp;lt;b&amp;gt;me&amp;lt;/b&amp;gt;</TextArea1>

Any help will be much appreciated.

Simon.
--
--
* Please reply to group for the benefit of all
* Found the answer to your own question? Post it!
* Get a useful reply to one of your posts?...post an answer to another one
* Search first, post later : http://www.google.co.uk/groups
* Want my email address? Ask me in a post...Cos2MuchSpamMakesUFat!

--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 5607 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!


Mar 19 '07 #2
text in a xml node is encoded as you see. if you want the html to appear
as xml, then be sure its valid xml and insert it as innerXml

-- bruce (sqlwork.com)

Simon Harris wrote:
Hi All,

I am trying to store an HTML string within an XML node, using:
Node.InnerText = strContent

Problem is, the HTML ends up like this, when its in the XML:
<TextArea1>&amp;lt;b&amp;gt;me&amp;lt;/b&amp;gt;</TextArea1>

Any help will be much appreciated.

Simon.
Mar 19 '07 #3
If you want your HTML that is stored in the innerText of an Xml Element to be
treated without the Xml Parser attempting to parse it, just surround within a
CDATA section. This tells the parser "Leave this alone".
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Simon Harris" wrote:
Hi All,

I am trying to store an HTML string within an XML node, using:
Node.InnerText = strContent

Problem is, the HTML ends up like this, when its in the XML:
<TextArea1>&lt;b>me</b></TextArea1>

Any help will be much appreciated.

Simon.
--
--
* Please reply to group for the benefit of all
* Found the answer to your own question? Post it!
* Get a useful reply to one of your posts?...post an answer to another one
* Search first, post later : http://www.google.co.uk/groups
* Want my email address? Ask me in a post...Cos2MuchSpamMakesUFat!

--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 5607 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
Mar 19 '07 #4
Thank you for your replies. Using innerXML seemed to work.

--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 5685 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
Mar 21 '07 #5

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

Similar topics

3
by: Mark | last post by:
I have a website with an increasing amount of articles and news reports and so I am thinking of moving away from storing each article as a seperate page to having a single page and storing articles...
8
by: Steven | last post by:
Hi there, I am wanting to store price data as n.nn format, so if the user enters "1" the data that gets stored is "1.00" Is there a way to do this. Cheers Steven
6
by: Jonathan | last post by:
I want to save textarea contents to a mysql database with the paragraph breaks intact without having to type paragraph or break tags in HTML. How can I do that. So far, although it occurs naturally...
2
by: Mark Hannon | last post by:
I am trying to wrap my brain around storing form elements inside variables & arrays before I move on to a more complicated project. I created this simple example to experiment and as far as I can...
3
by: Peter Hardy | last post by:
Hi guys, Sorry for the cross-post but I got no response in the asp.net newsgroup. I am trying to develop a mini e-learning application where the user provides content for each page....
2
by: Robert Hanson | last post by:
I am new to the asp.net application building and I have read the information regarding the storing of information using session vs cookies vs viewstate. I am asking for suggestions/guidance as to...
0
by: Merek | last post by:
Hi all, We need to allow the user to store, view and edit blocks of rich text via an ASP.NET application. After adopting one of the many rich text editors out there that outputs HTML we are...
4
by: Frank Rizzo | last post by:
In classic ASP, it was considered a bad idea to store VB6-created objects in the Application variable for various threading issues. What's the current wisdom on storing objects in the Application...
5
by: Nikolay Petrov | last post by:
When using System.Security.Cryptography to Encrypt/Decrypt information, I need to store two values - the Initialization Vector and the Encryption Key. The are both needed in Encryption/Decryption...
0
by: Larry Neylon | last post by:
Hi there, I'm currently trying to implement a website that will store and retrieve Polish, so I need to be able to handle Polish characters using classic ASP with MySql5. Does anybody have an...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
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: 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

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.