xpath以获取包含特定值的属性,而不论名称如何
我有一个XML,其中包含这样的元素,
<i:Interaction.Behaviors>
<behaviors:SplitViewAutoBehavior ToggleAction="{Binding NavBar.ToggleAction, Mode=OneWayToSource}"
CollapseOnClickAction="{Binding NavBar.CollapseOnClickAction, Mode=OneWayToSource}"
CollapseThreshold="{StaticResource SplitViewCollapseThreshold}" />
</i:Interaction.Behaviors>
我想扫描整个XML结构的属性,其值以“ {binding”
的属性开头,无论属性的名称如何。
到目前为止,我尝试了几个语法变化,但是当您寻找的属性名称未知时,我还没有找到语法,而是寻找值。
I have an XML that contains elements like this
<i:Interaction.Behaviors>
<behaviors:SplitViewAutoBehavior ToggleAction="{Binding NavBar.ToggleAction, Mode=OneWayToSource}"
CollapseOnClickAction="{Binding NavBar.CollapseOnClickAction, Mode=OneWayToSource}"
CollapseThreshold="{StaticResource SplitViewCollapseThreshold}" />
</i:Interaction.Behaviors>
I would like to scan the whole XML structure for attributes whose values start with "{Binding"
, regardless of the name of the attribute.
I have tried so far with several syntax variations, but I haven't found a syntax when the attribute name you look for is unknown, and you look for values instead.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此 XPath
将根据请求选择值以
'{Binding'
开头的所有属性。This XPath,
will select all attributes whose values start with
'{Binding'
, as requested.