Mercurial > dive4elements > framework
comparison artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java @ 202:c03d3a872cd2
Fixed a bug in the ElementCreator of the XMLUtils.
artifacts/trunk@1447 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 10 Mar 2011 08:25:30 +0000 |
parents | 9a64e0c1c737 |
children | 23d642319a0b |
comparison
equal
deleted
inserted
replaced
201:973f244ed568 | 202:c03d3a872cd2 |
---|---|
136 Element element, | 136 Element element, |
137 String name, | 137 String name, |
138 String value, | 138 String value, |
139 boolean addPrefix | 139 boolean addPrefix |
140 ) { | 140 ) { |
141 Attr attr = document.createAttributeNS(ns, name); | 141 if (addPrefix) { |
142 attr.setValue(value); | 142 Attr attr = document.createAttributeNS(ns, name); |
143 | 143 attr.setValue(value); |
144 if (addPrefix) | |
145 attr.setPrefix(prefix); | 144 attr.setPrefix(prefix); |
146 | 145 |
147 element.setAttributeNode(attr); | 146 element.setAttributeNode(attr); |
147 } | |
148 else { | |
149 element.setAttribute(name, value); | |
150 } | |
151 | |
148 } | 152 } |
149 } // class ElementCreator | 153 } // class ElementCreator |
150 | 154 |
151 /** | 155 /** |
152 * Creates a new XML document | 156 * Creates a new XML document |