Prevent XmlTextReader from Decoding HTML

Naiker

New Member
I'm using XMLTextReader to parse a homebrew markup language that is being used to parse user-generated content on my website (which is made with ASP.NET)I am writing a specification for the language, and I'm trying to use HTML encoding so that i can display < and > characters on my webpage without browsers picking them up as markup. After the page pulls the data from a MYSQL database, it first feeds it through my XML parser, then displays the content to the user in a LiteralControl. The problem is that my &lt's and &gt's are actually being converted to < and >s by the XML parser and being treated as markup (which I don't want).How can I make the XMLTextReader read the string pulled from the database as-is, without it trying to decode encoded HTML?
 
Back
Top