I have an xml.
<ClinicalDocuments>
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:axolotl="urn:axolotl-com:pdo">
<realmCode xmlns="" code="US"/>
<typeId xmlns="" extension="POCD_HD000040" root="2.16.840.1.113883.1.3"/>
<templateId xmlns="" root="1.3.6.1.4.1.19376.1.5.3.1"/>
<templateId xmlns="" root="1.3.6.1.4.1.19376.1.5.3.1.1"/>
<templateId xmlns="" root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId xmlns="" root="2.16.840.1.113883.10.20.3"/>
<templateId xmlns="" root="2.16.840.1.113883.10.20.1"/>
<templateId xmlns="" root="2.16.840.1.113883.3.88.11.32.1"/>
<id xmlns="" root="006e50e9-29b5-4ab2-8c0b-202819b39646"/>
blah
blah
</ClinicalDocument>
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
blah
blah
.
.
</ClinicalDocument>
</ClinicalDocuments>
xmlns="" is overritting the the main xmlns.
I want to delete all other instances on xmlns="" while keeping the one at the root node "ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:axolotl="urn:axolotl-com:pdo"
There are many other xmlns="" in the entire xml. Please help.
ClinicalDocument
is not the root node. Next, its children are in no-namespace and thexmlns=""
decalration is required to make that clear. Do you want move them to their parent's namespace? This will effectively change your XML schema, so think carefully about the consequences before you do. – michael.hor257k