Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Removing 1 bound namespace from XML (http://www.mirthcorp.com/community/forums/showthread.php?t=215552)

craig.burdulis 02-05-2016 06:54 AM

Removing 1 bound namespace from XML
I'm trying to remove the xmlns:cda namespace from the line below:

<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xmlns:cda="urn:hl7-org:v3" xmlns:sdtc="urn:hl7-org:sdtc">
I have tried a myriad of ways, both on the source and destination ends of the channel, with no luck. I do not want to strip namespaces since only the xmlns:cda namespace is causing issues with the channel processing.

I've tried (separately):

msg.replace('xmlns:cda="urn:hl7-org:v3"', '')
delete tmp['@xmlns:cda']

to no avail. Any ideas? I feel like I am not referencing the namespace correctly.

jackwhaines 02-12-2016 08:43 AM

So close! Try this:


msg = msg.replace('xmlns:cda="urn:hl7-org:v3"', '')

All times are GMT -8. The time now is 12:27 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation