changeset 391:ee8003fffc71

Use XMLUtils.ElementCreator to create new nodes in xml documents. gnv/trunk@524 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Sat, 09 Jan 2010 17:02:03 +0000
parents f2e2053ecf23
children 1b8fd2635ce4
files gnv/ChangeLog gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java
diffstat 2 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gnv/ChangeLog	Fri Jan 08 14:31:19 2010 +0000
+++ b/gnv/ChangeLog	Sat Jan 09 17:02:03 2010 +0000
@@ -1,3 +1,8 @@
+2010-01-09  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	* src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java:
+	  Use XMLUtils.ElementCreator to create new elements for xml documents.
+
 2010-01-08  Tim Englich  <tim.englich@intevation.de>
 
 	* src/main/java/de/intevation/gnv/action/SelectArtifactFactoryAction.java (execute),
--- a/gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java	Fri Jan 08 14:31:19 2010 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java	Sat Jan 09 17:02:03 2010 +0000
@@ -297,9 +297,13 @@
      * @return
      */
     private Element createArtifactElement(Document document, String name) {
-        Element node = document.createElementNS(NAMESPACE_URI, name);
-        node.setPrefix(NAMESPACE_PREFIX);
-        return node;
+        XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator(
+            document,
+            NAMESPACE_URI,
+            NAMESPACE_PREFIX
+        );
+
+        return creator.create(name);
     }
 
     /**

http://dive4elements.wald.intevation.org