Solved

How do I pass an XML reader that expands HTML entities?

Posted on 2009-04-14
2
398 Views
Last Modified: 2012-05-06
I am trying to bind an xml document to a dataset. The problem is the XML document  has special characters namliey html chracters. This Xml document will be used for updating and making changes to a product catalog-- so simply removing the HTML Entities isnt an option.

How do I pass an XML reader that expands HTML entities? I am using XmlTextReader.
DataSet DS = new DataSet();
                DS.XmlTextReader(Server.MapPath("countries.xml"));
				DG1.DataSource = DS;
				DG1.DataBind();

Open in new window

0
Comment
Question by:Vitamin1
2 Comments
 
LVL 15

Accepted Solution

by:
oobayly earned 250 total points
ID: 24141853
If you mean having something life the following xml, you could use CDATA. Anything in a CDATA element is interpreted as literal text.
<element><![CDATA[
  <div>
    <a href='http://www.google.com'>Google</a>
  </div>
]]></element>

Open in new window

0
 

Author Comment

by:Vitamin1
ID: 24149084
Sorry, not what I meant. the idea is we have this product database that comes down as an XML we can edit the content of the XML and then push the edited XML document back up to the server. I was trying to use a dataset in order to do this but the current ml reader i am using cannot expand the html entities found with in the product descriptions and the like..
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

822 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question