I am developing a WCF REST web service in c# (.net Framework 3.5, using Visual Studio 2010) which pulls rows from an MSSQL DB. One of the columns that gets pulled is type "nvarchar(max)" and always contains a XAML formatted text string who's root node is a <section>
element and contained within that are paragraph/run elements.
I want to extract the inner text from the <run>
element.
I am trying to use the XamlReader class in the System.Windows.markup namespace to do this.
According to the msdn documentation on this class, it should have a parse method. http://msdn.microsoft.com/en-us/library/vstudio/cc663064(v=vs.90).aspx but mine does not. Intelli-sense is only giving me the following methods: CancelAsync, Equals, GetHashCode,GetType, LoadAsync, LoadCompleted and ToString.
This is the function I am trying to create (incomplete but you get the idea)
private string extractRunElementFromXaml(string inputXaml)
{
XamlReader xr = new XamlReader();
Object out = xr.Parse(inputXaml); //doesnt work, no Parse method
}
Any assistance very much appreciated. Thanks