1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/formatting/XmlFormatter.java Wed Jan 08 20:08:53 2014 +0100
1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/formatting/XmlFormatter.java Wed Jan 08 23:39:47 2014 +0100
1.3 @@ -138,11 +138,19 @@
1.4
1.5 Map<QName, String> attributes = null;
1.6 if (labeledColumns) {
1.7 - attributes = new LinkedHashMap<>(1);
1.8 + attributes = new LinkedHashMap<>(2);
1.9 attributes.put(qname("label"), getCurrentColumnsHeader().getColumnDescriptors().get(getCurrentColumnsCount() - 1).getLabel());
1.10 }
1.11
1.12 - printTextElement(qname("column"), attributes, toString(value));
1.13 + if (value == null) {
1.14 + if (attributes == null) {
1.15 + attributes = new LinkedHashMap<>(2);
1.16 + attributes.put(qname("null"), "true");
1.17 + printEmptyElement(qname("column"), attributes);
1.18 + }
1.19 + } else {
1.20 + printTextElement(qname("column"), attributes, toString(value));
1.21 + }
1.22 }
1.23
1.24 @Override