diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
index 5ec2cf59b1..2522feebec 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
@@ -293,6 +293,8 @@ language governing permissions and limitations under the License. -->
src/test/resources/TestUnpackContent/data.flowfilev2
src/test/resources/TestUnpackContent/data.flowfilev3
src/test/resources/TestXml/xml-bundle-1
+ src/test/resources/TestXml/namespaceSplit1.xml
+ src/test/resources/TestXml/namespaceSplit2.xml
src/test/resources/CompressedData/SampleFile.txt.bz2
src/test/resources/CompressedData/SampleFile.txt.gz
src/test/resources/CompressedData/SampleFile1.txt.bz2
diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java
index 6d5b30aacb..cfe923bdd1 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java
@@ -318,7 +318,7 @@ public class SplitXml extends AbstractProcessor {
sb.append(entry.getKey());
sb.append("=\"");
sb.append(entry.getValue());
- sb.append("\" ");
+ sb.append("\"");
}
}
diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitXml.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitXml.java
index e0a2e0910e..1815b3b6b2 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitXml.java
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitXml.java
@@ -109,6 +109,11 @@ public class TestSplitXml {
parseFlowFiles(runner.getFlowFilesForRelationship(SplitXml.REL_ORIGINAL));
parseFlowFiles(runner.getFlowFilesForRelationship(SplitXml.REL_SPLIT));
+
+ final MockFlowFile split1 = runner.getFlowFilesForRelationship(SplitXml.REL_SPLIT).get(0);
+ split1.assertContentEquals(Paths.get("src/test/resources/TestXml/namespaceSplit1.xml"));
+ final MockFlowFile split2 = runner.getFlowFilesForRelationship(SplitXml.REL_SPLIT).get(1);
+ split2.assertContentEquals(Paths.get("src/test/resources/TestXml/namespaceSplit2.xml"));
}
public void parseFlowFiles(List flowfiles) throws Exception, SAXException {
diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestXml/namespaceSplit1.xml b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestXml/namespaceSplit1.xml
new file mode 100644
index 0000000000..eec3ed4671
--- /dev/null
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestXml/namespaceSplit1.xml
@@ -0,0 +1 @@
+Hello & Goodbye
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestXml/namespaceSplit2.xml b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestXml/namespaceSplit2.xml
new file mode 100644
index 0000000000..38bb4b2b17
--- /dev/null
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestXml/namespaceSplit2.xml
@@ -0,0 +1 @@
+World
\ No newline at end of file