Still looking for a sponsor Max Paulousky is looking for a Silverlight/.Net job in the Commonwealth

How to get Xml InnerText in a Silverlight application – 2

There is an easier way to remove all xml tags from the document – regular expressions: Regex.Replace(text, @"<\/?[^>]*\/?>", string.Empty); Tagged: Silverlight , Xml , InnerText , Regular Expressions This work is licensed under a Creative Commons Attribution By license.

How to get Xml InnerText in a Silverlight application

The Silverlight framework is restricted in comparison with .Net framework. It does not provide the XmlDocument class, that has the InnerText property. Silverlight applications should use XDocument instead of XmlDocument. Following code is an extension method for the XNode class that implements InnerText functionality. public static string InnerText(this XNode xNode) { bool isContainer = xNode is XContainer; if (!isContainer) { switch (xNode.NodeType) ...