I'm using an XPathNodeIterator to select an element in an XML document that
contains text I am going to put in a label on an aspx page.
I want to be able to include HTML tags in the text read from the XML
document, but the XPathNodeIterator.Current.Value property seems to ignore
any tags. The text inside the tags is included, but the tags themselves are
not. Is this possible or
is there something else I need to do?
<root>
<home_page_quote>
This is a <b>test</b> for <i>fomatting</i>.
</home_page_quote>
</root>
XPathDocument xmlDoc = new XPathDocument(Server.MapPath("") + "\\Pages.xml");
XPathNavigator xmlNav = xmlDoc.CreateNavigator();
XPathNodeIterator xmlIt = xmlNav.Select("/root/home_page_quote");
xmlIt.MoveNext();
Label1.Text = xmlIt.Current.Value(); // Does not have the <b> or <i> tags
included.