Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/StringAttribute.java @ 1987:382e38164200
Fixed wrong usage of DOM operations in Settings Attributes.
flys-artifacts/trunk@3421 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 15 Dec 2011 09:43:54 +0000 |
parents | 3632150dbe0b |
children | 5c1e7c1e9e09 |
comparison
equal
deleted
inserted
replaced
1986:3632150dbe0b | 1987:382e38164200 |
---|---|
1 package de.intevation.flys.exports; | 1 package de.intevation.flys.exports; |
2 | 2 |
3 import org.w3c.dom.Attr; | 3 import org.w3c.dom.Attr; |
4 import org.w3c.dom.Document; | 4 import org.w3c.dom.Document; |
5 import org.w3c.dom.Element; | |
5 import org.w3c.dom.Node; | 6 import org.w3c.dom.Node; |
6 | 7 |
7 | 8 |
8 /** | 9 /** |
9 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
25 * @return the new Node that represents this Attribute. | 26 * @return the new Node that represents this Attribute. |
26 */ | 27 */ |
27 @Override | 28 @Override |
28 public Node toXML(Node parent) { | 29 public Node toXML(Node parent) { |
29 Document owner = parent.getOwnerDocument(); | 30 Document owner = parent.getOwnerDocument(); |
30 Node node = super.toXML(parent); | |
31 | 31 |
32 Attr attr = owner.createAttribute("type"); | 32 Element ele = (Element) super.toXML(parent); |
33 attr.setValue("string"); | 33 ele.setAttribute("type", "string"); |
34 | 34 |
35 node.appendChild(attr); | 35 return ele; |
36 | |
37 return node; | |
38 } | 36 } |
39 } | 37 } |
40 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 38 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |