Skip to content

Commit f3e3bf2

Browse files
committed
Resolve #247: set namespace map directly in SimpleXmlEncoder
Adds a `setNamespaces` setter to `SimpleXmlEncoder` which accepts a map of strings defining the namespaces for the xml document generated by the encoder.
1 parent 3c0c1f4 commit f3e3bf2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/org/culturegraph/mf/stream/converter/xml/SimpleXmlEncoder.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ public void setSeparateRoots(final boolean separateRoots) {
108108
}
109109

110110
public void setNamespaces(final MultiMap multimap) {
111-
this.namespaces = multimap.getMap(NAMESPACES);
111+
setNamespaces(multimap.getMap(NAMESPACES));
112+
}
113+
114+
public void setNamespaces(final Map<String, String> namespaces) {
115+
this.namespaces = namespaces;
112116
}
113117

114118
@Override

0 commit comments

Comments
 (0)