Announcement

Collapse
No announcement yet.

Removing 1 bound namespace from XML

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Removing 1 bound namespace from XML

    I'm trying to remove the xmlns:cda namespace from the line below:
    Code:
    <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):
    Code:
    msg.removeNamespace('@xmlns:cda');
    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.

  • #2
    So close! Try this:

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

    -= Jack Haines : Founder/CEO of Healthcare Integrations, LLC
    -= [email protected]
    -= Mirth Connect (Advanced)-certified
    -= Gold member of HL7.org
    -= Available for Mirth Connect channel development and consultation! Schedule a FREE call with me at https://calendly.com/jackhaines

    Comment

    Working...
    X