开发者

How to trim whitespace from a data-bound XML element in WPF using XPath?

开发者 https://www.devze.com 2022-12-13 03:54 出处:网络
How can the whitespace at the start and end of the content of an 开发者_StackOverflowXML element be removed when binding to the element using XPath in WPF?Assuming you mean something like:

How can the whitespace at the start and end of the content of an 开发者_StackOverflowXML element be removed when binding to the element using XPath in WPF?


Assuming you mean something like:

<x:XData>
   <foo>     Bar    </foo>
</x:Data>

then there's no whitespace to trim here. Whitespace immediately following the opening tag, and immediately preceding the closing tag, is insignificant, and will be ignored anyway.

0

精彩评论

暂无评论...
验证码 换一张
取 消