Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 409
  • Last Modified:

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

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
Vitamin1
Asked:
Vitamin1
1 Solution
 
oobaylyCommented:
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
 
Vitamin1Author Commented:
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

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now