BizTalk 2013r2 - C# String Replace in Expression Editor

185 views Asked by At

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("&","&amp;") + @"</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

0

There are 0 answers