有没有办法在wpf中使用XPath绑定来读取整个InnerXml(或OuterXml)?
示例数据提供程序
<XmlDataProvider x:Key="SampleDataProvider" IsInitialLoadEnabled="True" IsAsynchronous="False" XPath="SampleDataProvider">
<x:XData>
<SampleData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="">
<Property ID="BlinkData">
<Blink>
<Property ID="Name">Blink1</Property>
<Property ID="Speed">400</Property>
<Property ID="Value1">0</Property>
<Property ID="Value2">100</Property>
</Blink>
</Property>
</SampleData>
</x:XData>
</XmlDataProvider>
样例窗口
<TextBox>
<TextBox.Text>
<Binding Source="{StaticResource ResourceKey=SampleDataProvider}" XPath="/SampleData/Property[@ID='BlinkData']" />
</TextBox.Text>
</TextBox>
我希望在文本框中看到整个InnerXml。但不幸的是,我只看到了节点值,比如Blink14000100。
这里有什么我漏掉的吗?