Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2009-04-14
2
399 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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 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