Storing HTML in XML

  • Thread starter Thread starter Simon Harris
  • Start date Start date
S

Simon Harris

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!
 
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)
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top