From 3d312a1863a484de5ec7a922a7ed266bdff7c06f Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 6 Mar 2021 08:57:44 +1100 Subject: [PATCH] fix bug generating htmlized XML with no namespaces --- .../src/main/java/org/hl7/fhir/utilities/xml/XmlGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XmlGenerator.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XmlGenerator.java index 9b1091e14..a8cbc6ec9 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XmlGenerator.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XmlGenerator.java @@ -111,7 +111,7 @@ public class XmlGenerator { } private void processElement(Element element) throws IOException, FHIRException { - if (!xml.getDefaultNamespace().equals(element.getNamespaceURI())) + if (xml.getDefaultNamespace() == null || !xml.getDefaultNamespace().equals(element.getNamespaceURI())) xml.setDefaultNamespace(element.getNamespaceURI()); processAttributes(element);