I'm trying to get ASP.net to write out some XML including HTML from a DB:
The HTML is stored in the DB as encoded HTML. I'm trying to decode it and
write it to an XML node (The HTML is valid XML). I have this:
objXMLWriter.Wr iteElementStrin g("text",
Trim(System.Web .HttpContext.Cu rrent.Server.Ht mlDecode(DS.Tab les(0).Rows(row Count)("itemTex t").ToString )))
But in the XML file, it's still coming out encoded. It appears that the
XmlTextWriter encodes HTML content by default, as I can write out
System.Web.Http Context.Current .Server.HtmlDec ode(DS.Tables(0 ).Rows(rowCount )("itemText").T oString
to screen and it comes out fine (not encoded). Anyway to turn this off?
_Darrel
--
=============== =============== =============== =============== =====
Win prizes searching google:
The HTML is stored in the DB as encoded HTML. I'm trying to decode it and
write it to an XML node (The HTML is valid XML). I have this:
objXMLWriter.Wr iteElementStrin g("text",
Trim(System.Web .HttpContext.Cu rrent.Server.Ht mlDecode(DS.Tab les(0).Rows(row Count)("itemTex t").ToString )))
But in the XML file, it's still coming out encoded. It appears that the
XmlTextWriter encodes HTML content by default, as I can write out
System.Web.Http Context.Current .Server.HtmlDec ode(DS.Tables(0 ).Rows(rowCount )("itemText").T oString
to screen and it comes out fine (not encoded). Anyway to turn this off?
_Darrel
--
=============== =============== =============== =============== =====
Win prizes searching google:
Comment