biztalk-pipelines

FHIR JSON to XML decoding in BizTalk

戏子无情 提交于 2019-12-13 17:51:32
问题 I am just starting out with FHIR and with json so my question may not be well asked. I have built a BizTalk pipeline component to convert FHIR-json to FHIR-xml using this library, https://github.com/ewoutkramer/fhir-net-api , based on an example i found here, http://soapfault.com/blog/2016/08/hl7-fhir-json-decoding-in-biztalk/ Here is a code snippet from the pipeline component. It's almost identical to the example. //Read the json message using (TextReader tr = new StreamReader

Add namespace and alias to existing xml

元气小坏坏 提交于 2019-12-11 15:56:21
问题 I am using the code below to change a namespace in an existing XML message in a BizTalk pipeline component. This works but how would I add a namespace alias to the document as well. XNamespace toNs = "http://hl7.org/fhir/Encounters"; XElement doc = XElement.Parse(xmlIn); doc.DescendantsAndSelf().Attributes().Where(a => a.IsNamespaceDeclaration).Remove(); var ele = doc.DescendantsAndSelf(); foreach (var el in ele) el.Name = toNs + el.Name.LocalName; return new XDocument(doc); 回答1: You can