Solved

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now