<panahyAjax:XmlLabel runat=”server” ID=”xmlLabel”>
<this>
<is just=”one”>sample</is>
</this>
</panahyAjax:XmlLabel>
Or
XmlLabel label = new XmlLabel();
var file = File.OpenText(“Sample.xml”);
label.Text = file.ReadToEnd();
public class XmlLabel : Label
{
public static string ConvertXmlTextToHtmlText(string inputText)
{
// Replace all start and end tags.
string startPattern = @”<([^>]+)>”;
var regEx = new Regex(startPattern);
string outputText = regEx.Replace(inputText, “<<b>$1></b>”);
outputText = outputText.Replace(” “, “ ”);
outputText = outputText.Replace(“rn”, “<br />”);
return outputText;
}
protected override void RenderContents(HtmlTextWriter output)
{
string xmlText = XmlLabel.ConvertXmlTextToHtmlText(Text);
output.Write(xmlText);
}
}