I got a Xaml file that starts like this:
<FlowDocument
x:Name="flowDocument"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Drawing="clr-namespace:System.Drawing;assembly=System.Drawing"
Current solution uses a StremReader by referring to the physical path of the xaml file with the flowdocument and then parses data into the template.
This is not a valid solution, so I need to get the flowdocument withouth referring to the physical path.
I would like to use the xmlns namespace or similar in my C# code and do like
string result = XamlWriter.Save(flowDocument)
And use the result for parsing.
Suggestions?