BizTalk 2013R2 -C#字符串替换在表达式编辑器中

发布于 2025-01-24 02:07:50 字数 565 浏览 2 评论 0原文

我目前正在使用表达式编辑器在我的编排中构建XML有效载荷,但是我需要将基于XML的逃生字符(&)的所有及数交换。

未修改的XML是;

<value>" + StudentCanonical(Student_Feed.StudentCanonicalProperty.school_name) + @"</value>

我已经尝试添加以下内容,但是在.replace方法上我会收到“非法虚拟名称”错误;

<value>" + StudentCanonical(Student_Feed.StudentCanonicalProperty.school_name).Replace("&","&amp;") + @"</value>

笔记; sudentCanonicalProperty.school_name)是从另一类引用的促进属性(这是直接接收的消息)。

我相信这可能与被提升和没有区分的领域有关。 如果是这种情况,我可以使该领域既有区分和晋升,否则是否有其他方法?

谢谢

I'm currently using an expression editor to build an XML payload within my orchestration, but I need to swap out any ampersands for the XML based escape character (&).

The unmodified XML is;

<value>" + StudentCanonical(Student_Feed.StudentCanonicalProperty.school_name) + @"</value>

I've tried adding the below, but I get an 'illegal dotted name' error on the .Replace method;

<value>" + StudentCanonical(Student_Feed.StudentCanonicalProperty.school_name).Replace("&","&") + @"</value>

Note; StudentCanonicalProperty.school_name) is a promoted property referenced from another class (it's a directly received message).

I believe this may be related to the field being Promoted and not Distinguished.
If this is the case, can I make the field both distinguished AND promoted, or is there an alternate approach?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文